|
| 1 | +import js from '@eslint/js' |
| 2 | +import prettier from 'eslint-config-prettier' |
| 3 | +import reactHooks from 'eslint-plugin-react-hooks' |
| 4 | +import reactRefresh from 'eslint-plugin-react-refresh' |
| 5 | +import globals from 'globals' |
| 6 | +import tseslint from 'typescript-eslint' |
| 7 | + |
| 8 | +export default tseslint.config( |
| 9 | + { ignores: ['dist'] }, |
| 10 | + { |
| 11 | + extends: [js.configs.recommended, ...tseslint.configs.recommended, prettier], |
| 12 | + files: ['**/*.{ts,tsx}'], |
| 13 | + languageOptions: { |
| 14 | + ecmaVersion: 2020, |
| 15 | + globals: globals.browser, |
| 16 | + }, |
| 17 | + plugins: { |
| 18 | + 'react-hooks': reactHooks, |
| 19 | + 'react-refresh': reactRefresh, |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + ...reactHooks.configs.recommended.rules, |
| 23 | + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], |
| 24 | + '@typescript-eslint/no-explicit-any': 0, |
| 25 | + '@typescript-eslint/no-non-null-assertion': 0, |
| 26 | + '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], |
| 27 | + 'react/display-name': 0, |
| 28 | + 'react/prop-types': 0, |
| 29 | + 'react/react-in-jsx-scope': 0, |
| 30 | + }, |
| 31 | + } |
| 32 | +) |
0 commit comments