|
| 1 | +module.exports = { |
| 2 | + parser: '@typescript-eslint/parser', |
| 3 | + extends: [ |
| 4 | + 'eslint:recommended', |
| 5 | + 'prettier', |
| 6 | + 'plugin:react/recommended', |
| 7 | + 'plugin:react-hooks/recommended', |
| 8 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 9 | + 'plugin:testing-library/react' |
| 10 | + ], |
| 11 | + plugins: [ |
| 12 | + 'react', |
| 13 | + 'prettier', |
| 14 | + '@typescript-eslint' |
| 15 | + ], |
| 16 | + env: { |
| 17 | + node: true |
| 18 | + }, |
| 19 | + parserOptions: { |
| 20 | + ecmaVersion: 2020, |
| 21 | + ecmaFeatures: { |
| 22 | + legacyDecorators: true, |
| 23 | + jsx: true |
| 24 | + } |
| 25 | + }, |
| 26 | + settings: { |
| 27 | + 'import/resolver': { |
| 28 | + node: { |
| 29 | + extensions: [ '.ts', '.tsx' ] |
| 30 | + }, |
| 31 | + typescript: {} |
| 32 | + }, |
| 33 | + react: { |
| 34 | + version: 'detect' |
| 35 | + } |
| 36 | + }, |
| 37 | + ignorePatterns: [ |
| 38 | + '**/build/**/*', |
| 39 | + '**/dist/**/*', |
| 40 | + '**/node_nodules/**/*' |
| 41 | + ], |
| 42 | + rules: { |
| 43 | + semi: [ |
| 44 | + 'error', |
| 45 | + 'always' |
| 46 | + ], |
| 47 | + quotes: [ |
| 48 | + 'error', |
| 49 | + 'single' |
| 50 | + ], |
| 51 | + 'no-console': [ |
| 52 | + 'warn', |
| 53 | + { |
| 54 | + allow: [ |
| 55 | + 'warn', |
| 56 | + 'error' |
| 57 | + ] |
| 58 | + } |
| 59 | + ], |
| 60 | + 'comma-dangle': [ |
| 61 | + 'error', |
| 62 | + 'never' |
| 63 | + ], |
| 64 | + indent: [ 'error', 2 ], |
| 65 | + 'guard-for-in': 0, |
| 66 | + 'no-param-reassign': 0, |
| 67 | + 'react/require-default-props': 0, |
| 68 | + 'jsx-quotes': 0, |
| 69 | + 'react/prop-types': 0, |
| 70 | + 'react/jsx-fragments': 0, |
| 71 | + 'react/no-unused-prop-types': 0, |
| 72 | + 'react/react-in-jsx-scope': 0, |
| 73 | + 'import/export': 0, |
| 74 | + 'prettier/prettier': 0, |
| 75 | + 'linebreak-style': 0, |
| 76 | + 'no-multiple-empty-lines': [ 'error', { max: 1, maxEOF: 0 } ], |
| 77 | + 'eol-last': 2, |
| 78 | + 'object-curly-spacing': [ 'error', 'always' ], |
| 79 | + 'array-bracket-spacing': [ 'error', 'always' ], |
| 80 | + 'computed-property-spacing': [ 'error', 'always' ], |
| 81 | + 'quote-props': [ 'error', 'as-needed' ], |
| 82 | + 'max-len': [ 'error', { code: 120, ignoreUrls: true } ], |
| 83 | + '@typescript-eslint/no-unused-vars': [ |
| 84 | + 2, |
| 85 | + { |
| 86 | + args: 'none' |
| 87 | + } |
| 88 | + ] |
| 89 | + } |
| 90 | +}; |
0 commit comments