|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + jest: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + '@ericgio/eslint-config-react', |
| 8 | + 'plugin:@typescript-eslint/recommended', |
| 9 | + 'plugin:react-hooks/recommended', |
| 10 | + 'prettier', |
| 11 | + ], |
| 12 | + globals: {}, |
| 13 | + overrides: [ |
| 14 | + { |
| 15 | + files: ['**/*'], |
| 16 | + rules: { |
| 17 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 18 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 19 | + 'import/extensions': 'off', |
| 20 | + 'no-shadow': 'off', |
| 21 | + 'no-use-before-define': 'off', |
| 22 | + 'react/jsx-no-bind': 'off', |
| 23 | + }, |
| 24 | + }, |
| 25 | + { |
| 26 | + files: ['**/*.stories.tsx'], |
| 27 | + rules: { |
| 28 | + 'import/no-extraneous-dependencies': 'off', |
| 29 | + 'sort-keys': 'off', |
| 30 | + }, |
| 31 | + }, |
| 32 | + { |
| 33 | + files: ['**/*.mjs'], |
| 34 | + rules: { |
| 35 | + 'import/no-extraneous-dependencies': 'off', |
| 36 | + 'no-console': 'off', |
| 37 | + 'no-underscore-dangle': 'off', |
| 38 | + }, |
| 39 | + }, |
| 40 | + ], |
| 41 | + parser: '@typescript-eslint/parser', |
| 42 | + plugins: ['@typescript-eslint'], |
| 43 | + rules: { |
| 44 | + '@typescript-eslint/no-shadow': 2, |
| 45 | + '@typescript-eslint/no-unused-vars': [ |
| 46 | + 2, |
| 47 | + { args: 'after-used', ignoreRestSiblings: true, vars: 'all' }, |
| 48 | + ], |
| 49 | + '@typescript-eslint/no-use-before-define': 'error', |
| 50 | + 'react/jsx-filename-extension': [ |
| 51 | + 1, |
| 52 | + { |
| 53 | + extensions: ['.js', '.jsx', '.tsx'], |
| 54 | + }, |
| 55 | + ], |
| 56 | + 'react/jsx-fragments': [2, 'syntax'], |
| 57 | + 'react/static-property-placement': [2, 'static public field'], |
| 58 | + }, |
| 59 | + settings: { |
| 60 | + 'import/resolver': { |
| 61 | + node: { |
| 62 | + extensions: ['.js', '.jsx', '.ts', '.tsx'], |
| 63 | + }, |
| 64 | + }, |
| 65 | + }, |
| 66 | +}; |
0 commit comments