|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es6: true, |
| 5 | + commonjs: true, |
| 6 | + node: true, |
| 7 | + 'jest/globals': true |
| 8 | + }, |
| 9 | + globals: { |
| 10 | + JSX: 'readonly' |
| 11 | + }, |
| 12 | + root: true, |
| 13 | + extends: [ |
| 14 | + 'eslint:recommended', |
| 15 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 16 | + 'plugin:@typescript-eslint/recommended', |
| 17 | + 'prettier/@typescript-eslint', |
| 18 | + 'plugin:react/recommended', |
| 19 | + 'plugin:jest/recommended' |
| 20 | + ], |
| 21 | + parser: '@typescript-eslint/parser', |
| 22 | + parserOptions: { |
| 23 | + project: 'tsconfig.eslint.json' |
| 24 | + }, |
| 25 | + plugins: ['@typescript-eslint', 'jest'], |
| 26 | + rules: { |
| 27 | + '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }], |
| 28 | + '@typescript-eslint/naming-convention': [ |
| 29 | + 'error', |
| 30 | + { |
| 31 | + selector: 'interface', |
| 32 | + format: ['PascalCase'], |
| 33 | + custom: { |
| 34 | + regex: '^I[A-Z]', |
| 35 | + match: true |
| 36 | + } |
| 37 | + } |
| 38 | + ], |
| 39 | + '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], |
| 40 | + '@typescript-eslint/no-use-before-define': 'off', |
| 41 | + '@typescript-eslint/camelcase': 'off', |
| 42 | + '@typescript-eslint/no-explicit-any': 'off', |
| 43 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 44 | + '@typescript-eslint/no-namespace': 'off', |
| 45 | + '@typescript-eslint/interface-name-prefix': 'off', |
| 46 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 47 | + '@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }], |
| 48 | + '@typescript-eslint/ban-types': 'warn', |
| 49 | + '@typescript-eslint/no-non-null-asserted-optional-chain': 'warn', |
| 50 | + '@typescript-eslint/no-var-requires': 'off', |
| 51 | + '@typescript-eslint/no-empty-interface': 'off', |
| 52 | + '@typescript-eslint/triple-slash-reference': 'warn', |
| 53 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 54 | + 'jest/no-conditional-expect': 'warn', |
| 55 | + 'jest/valid-title': 'warn', |
| 56 | + 'no-inner-declarations': 'off', |
| 57 | + 'no-prototype-builtins': 'off', |
| 58 | + 'no-control-regex': 'warn', |
| 59 | + 'no-undef': 'warn', |
| 60 | + 'no-case-declarations': 'warn', |
| 61 | + 'no-useless-escape': 'off', |
| 62 | + 'prefer-const': 'off', |
| 63 | + 'react/prop-types': 'warn', |
| 64 | + 'sort-imports': [ |
| 65 | + 'error', |
| 66 | + { |
| 67 | + ignoreCase: true, |
| 68 | + ignoreDeclarationSort: true, |
| 69 | + ignoreMemberSort: false, |
| 70 | + memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], |
| 71 | + allowSeparatedGroups: false |
| 72 | + } |
| 73 | + ] |
| 74 | + }, |
| 75 | + settings: { |
| 76 | + react: { |
| 77 | + version: 'detect' |
| 78 | + } |
| 79 | + } |
| 80 | +}; |
0 commit comments