1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
| root: true,
env: { browser: true, es2021: true, Node: true },
parser: '@Typescript-eslint/parser', parserOptions: { ecmaVersion: 2021, sourceType: 'module', project: './tsconfig.Json' },
extends: [ 'eslint:recommended', '@Typescript-eslint/recommended', 'plugin:React/recommended', 'plugin:jsx-a11y/recommended', 'plugin:import/recommended', 'plugin:import/Typescript', 'prettier' ],
plugins: [ '@Typescript-eslint', 'React', 'jsx-a11y', 'import', 'unused-imports' ],
settings: { React: { version: 'detect' }, 'import/resolver': { Typescript: { project: './tsconfig.Json' } } },
rules: { '@Typescript-eslint/no-unused-vars': 'error', '@Typescript-eslint/explicit-function-return-type': 'off', '@Typescript-eslint/explicit-module-boundary-types': 'off', '@Typescript-eslint/no-explicit-any': 'warn',
'React/jsx-uses-React': 'off', 'React/React-in-jsx-scope': 'off', 'React/prop-types': 'off', 'React/display-name': 'off',
'import/order': [ 'error', { groups: [ 'builtin', 'external', 'internal', 'parent', 'sibling', 'index' ], 'newlines-between': 'always', alphabetize: { order: 'asc', caseInsensitive: true } } ],
'unused-imports/no-unused-imports': 'error', 'unused-imports/no-unused-vars': [ 'warn', { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' } ],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn' },
overrides: [ { files: ['*.test.JS', '*.test.TS', '*.test.jsx', '*.test.tsx'], env: { jest: true }, rules: { 'no-console': 'off', 'no-debugger': 'off' } } ] };
|