diff --git a/.eslintrc.js b/.eslintrc.js index 9eaccae..ea72d4e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,22 +6,64 @@ module.exports = { tsconfigRootDir: __dirname, project: ['./tsconfig.json'], }, + plugins: [ + '@typescript-eslint/eslint-plugin', + '@typescript-eslint', + 'unused-imports' + ], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:react/recommended', 'plugin:jsx-a11y/recommended', - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'prettier', ], rules: { - 'prettier/prettier': ['error', {}, { usePrettierrc: true }], + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', 'react/prop-types': 'off', '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-var-requires': 'off', - 'jsx-a11y/no-autofocus': 'off' + 'jsx-a11y/no-autofocus': 'off', + 'array-element-newline': ['error', { + 'ArrayExpression': 'consistent', + 'ArrayPattern': { + 'minItems': 3, + 'multiline': true, + } + }], + 'array-bracket-newline': ['error', { + 'minItems': 3, + 'multiline': true, + }], + 'indent': [ + 'error', + 2, + { + 'SwitchCase': 1 + } + ], + 'no-tabs': ['error'], + 'max-len': ['error', { + 'code': 100, + 'ignoreComments': true, + 'ignoreUrls': true, + 'ignoreTemplateLiterals': true, + 'ignoreTrailingComments': true, + 'ignoreStrings': true, + }], + 'quotes': ['error', 'single', { 'avoidEscape': true }], + 'comma-dangle': ['error', 'always-multiline'], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'no-trailing-spaces': 'error', + 'eol-last': 'error', + 'unused-imports/no-unused-imports': 'error', }, settings: { react: { diff --git a/.gitignore b/.gitignore index fd5a4ce..11fc3f0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ yarn-error.log* # development environments /.idea +schema.graphql diff --git a/CHANGELOG.md b/CHANGELOG.md index 27028e5..c6d0887 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,12 +16,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - new slider field type - new card layout for forms - field logic +- add enviroment config ### Changed - combined notificationts to become more versatile - use exported hooks for graphql - disable swipe gesture +- upgrade to nextjs 12 ### Fixed diff --git a/Dockerfile b/Dockerfile index 1113fd7..3308049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,8 @@ WORKDIR /usr/src/app COPY --from=builder /usr/src/app /usr/src/app -ENV PORT=4000 +ENV PORT=4000 \ + NODE_ENV=production # Change to non-root privilege USER ohmyform diff --git a/components/auth/footer.tsx b/components/auth/footer.tsx index 5e8d624..bb4f76d 100644 --- a/components/auth/footer.tsx +++ b/components/auth/footer.tsx @@ -31,66 +31,66 @@ const AuthFooterInner: React.FC = (props) => {