|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + jest: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'airbnb', |
| 8 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 9 | + 'plugin:@typescript-eslint/recommended', |
| 10 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 11 | + 'plugin:prettier/recommended', |
| 12 | + 'prettier/react', |
| 13 | + 'prettier/@typescript-eslint', |
| 14 | + ], |
| 15 | + parser: '@typescript-eslint/parser', |
| 16 | + parserOptions: { |
| 17 | + project: ['./tsconfig.json'], |
| 18 | + }, |
| 19 | + plugins: ['@typescript-eslint', 'react-hooks'], |
| 20 | + rules: { |
| 21 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 22 | + '@typescript-eslint/consistent-type-definitions': ['error', 'type'], |
| 23 | + '@typescript-eslint/no-unused-vars': [ |
| 24 | + 'error', |
| 25 | + { |
| 26 | + vars: 'all', |
| 27 | + args: 'all', |
| 28 | + ignoreRestSiblings: false, |
| 29 | + argsIgnorePattern: '^_', |
| 30 | + }, |
| 31 | + ], |
| 32 | + 'import/no-extraneous-dependencies': [ |
| 33 | + 'error', |
| 34 | + { |
| 35 | + devDependencies: [ |
| 36 | + '**/*.config.{js,ts}', |
| 37 | + '**/*.spec.{ts,tsx}', |
| 38 | + '**/.storybook/**/*.{ts,tsx}', |
| 39 | + '**/*.stories.{ts,tsx}', |
| 40 | + '**/__fixtures__/**/*.{ts,tsx}', |
| 41 | + ], |
| 42 | + }, |
| 43 | + ], |
| 44 | + 'import/extensions': ['error', 'never'], |
| 45 | + 'import/order': ['error', { 'newlines-between': 'always' }], |
| 46 | + 'import/prefer-default-export': 0, |
| 47 | + 'import/no-default-export': 'error', |
| 48 | + 'react-hooks/exhaustive-deps': 'warn', |
| 49 | + 'react-hooks/rules-of-hooks': 'error', |
| 50 | + 'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }], |
| 51 | + 'react/jsx-key': ['error', { checkFragmentShorthand: true }], |
| 52 | + 'react/jsx-props-no-spreading': 0, |
| 53 | + 'react/prop-types': 0, |
| 54 | + }, |
| 55 | + settings: { |
| 56 | + 'import/resolver': { |
| 57 | + node: { |
| 58 | + extensions: ['.ts', '.tsx', '.js', '.jsx'], |
| 59 | + paths: ['./src', './node_modules'], |
| 60 | + }, |
| 61 | + }, |
| 62 | + }, |
| 63 | +} |
0 commit comments