diff --git a/.eslintrc.js b/.eslintrc.js index 6051afef..89cc7172 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { 'react/jsx-filename-extension': 'off', 'react/jsx-props-no-spreading': 'off', 'import/no-extraneous-dependencies': 'off', + 'import/prefer-default-export': 'off', 'prefer-destructuring': [ 'error', { VariableDeclarator: { diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 00000000..52187915 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,28 @@ +name: PR Actions + +on: + pull_request: + +concurrency: + group: ${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + checks: + runs-on: ubuntu-latest + + steps: + - name: Code Checkout + uses: actions/checkout@v3 + + - name: Install NodeJS + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'yarn' + + - name: Install NPM Dependencies + run: yarn install + + - name: Run Linting + run: yarn lint diff --git a/custom.d.ts b/custom.d.ts deleted file mode 100644 index 5783313c..00000000 --- a/custom.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "*.svg" { - const content: React.FunctionComponent>; - export default content; -} \ No newline at end of file diff --git a/src/components/AddDevice/AddDevice.tsx b/src/components/AddDevice/AddDevice.tsx index eea4df5a..04d0c743 100644 --- a/src/components/AddDevice/AddDevice.tsx +++ b/src/components/AddDevice/AddDevice.tsx @@ -12,7 +12,7 @@ import { openToast } from '../../lib/Toast'; import { useAuthState } from '../../lib/useAuthState'; import { decodeIfTruthy, inIframe } from '../../utils'; import { basePath } from '../../utils/config'; -import { checkFirestoreReady, firebaseAuth, getDomain } from '../../utils/firebase'; +import { checkFirestoreReady, firebaseAuth } from '../../utils/firebase'; import { isValidEmail } from '../../utils/form-validation'; const StyledContainer = styled.div` @@ -233,7 +233,7 @@ function SignInPage() { return window.firestoreController.addDeviceCollection({ fakPublicKey: null, lakPublicKey: public_key, - gateway: success_url, + gateway: success_url, }) .then(() => { const parsedUrl = new URL(success_url || window.location.origin); @@ -325,20 +325,22 @@ function SignInPage() { - { - setValue('email', e.target.value); + { + setValue('email', e.target.value); + // eslint-disable-next-line if (!isValidEmail(e.target.value)) return; - }} - placeholder="user_name@email.com" - type="email" - id="email" - required - /> + }} + placeholder="user_name@email.com" + type="email" + id="email" + required + /> + +