|
| 1 | +module.exports = { |
| 2 | + env: { browser: true, es6: true, jest: true, node: true }, |
| 3 | + extends: [ |
| 4 | + 'eslint:recommended', |
| 5 | + 'plugin:react/recommended', |
| 6 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 7 | + 'plugin:@typescript-eslint/recommended', |
| 8 | + 'plugin:prettier/recommended', |
| 9 | + ], |
| 10 | + parser: '@typescript-eslint/parser', |
| 11 | + parserOptions: { ecmaFeatures: { jsx: true }, ecmaVersion: 2020, project: ['tsconfig.json'], sourceType: 'module' }, |
| 12 | + plugins: ['@typescript-eslint', 'react-hooks', 'react', 'prettier'], |
| 13 | + rules: { |
| 14 | + '@typescript-eslint/no-empty-function': 'off', |
| 15 | + '@typescript-eslint/no-explicit-any': 'off', |
| 16 | + '@typescript-eslint/no-var-requires': 'off', |
| 17 | + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], |
| 18 | + 'max-len': ['warn', { code: 120, ignorePattern: '//', ignoreStrings: true }], |
| 19 | + 'new-cap': ['warn', { properties: false }], |
| 20 | + 'no-unused-vars': 'off', |
| 21 | + 'react/jsx-filename-extension': ['warn', { extensions: ['.jsx', '.tsx'] }], |
| 22 | + 'react/jsx-uses-react': 'off', |
| 23 | + 'react/no-unescaped-entities': 'off', |
| 24 | + 'react/prop-types': 'off', |
| 25 | + 'react/react-in-jsx-scope': 'off', |
| 26 | + 'react-hooks/rules-of-hooks': 'error', |
| 27 | + 'react-hooks/exhaustive-deps': 'warn', |
| 28 | + }, |
| 29 | + settings: { react: { version: 'detect' } }, |
| 30 | +}; |
0 commit comments