|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es6: true, |
| 5 | + jest: true, |
| 6 | + }, |
| 7 | + extends: [ |
| 8 | + 'plugin:react/recommended', |
| 9 | + 'airbnb', |
| 10 | + 'airbnb-typescript', |
| 11 | + 'plugin:prettier/recommended', |
| 12 | + ], |
| 13 | + parser: '@typescript-eslint/parser', |
| 14 | + parserOptions: { |
| 15 | + ecmaFeatures: { |
| 16 | + jsx: true, |
| 17 | + }, |
| 18 | + ecmaVersion: 2018, |
| 19 | + sourceType: 'module', |
| 20 | + project: './tsconfig.json', |
| 21 | + }, |
| 22 | + plugins: [ |
| 23 | + 'react', |
| 24 | + '@typescript-eslint', |
| 25 | + 'import', |
| 26 | + 'no-relative-import-paths', |
| 27 | + 'prettier', |
| 28 | + ], |
| 29 | + rules: { |
| 30 | + 'react/function-component-definition': 'off', |
| 31 | + 'react/prop-types': 'off', |
| 32 | + 'react/react-in-jsx-scope': 'off', |
| 33 | + 'import/extensions': [ |
| 34 | + 'error', |
| 35 | + 'ignorePackages', |
| 36 | + { ts: 'never', tsx: 'never' }, |
| 37 | + ], |
| 38 | + 'react/jsx-filename-extension': [ |
| 39 | + 'error', |
| 40 | + { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, |
| 41 | + ], |
| 42 | + 'import/prefer-default-export': 'off', |
| 43 | + 'no-unused-vars': 'off', |
| 44 | + 'react/jsx-props-no-spreading': 'off', |
| 45 | + 'react/jsx-no-useless-fragment': 'off', |
| 46 | + 'react/require-default-props': 'off', |
| 47 | + 'no-relative-import-paths/no-relative-import-paths': [ |
| 48 | + 'error', |
| 49 | + { rootDir: 'src' }, |
| 50 | + ], |
| 51 | + 'no-restricted-exports': 'off', |
| 52 | + 'no-eval': 'off', |
| 53 | + }, |
| 54 | + settings: { |
| 55 | + 'import/resolver': { |
| 56 | + node: { |
| 57 | + extensions: ['.js', '.jsx', '.d.ts', '.ts', '.tsx'], |
| 58 | + moduleDirectory: ['node_modules', 'src'], |
| 59 | + }, |
| 60 | + }, |
| 61 | + react: { |
| 62 | + version: 'detect', |
| 63 | + }, |
| 64 | + }, |
| 65 | +}; |
0 commit comments