-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
50 lines (47 loc) · 1.52 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import globals from 'globals';
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import EslintConfigPrettier from 'eslint-config-prettier';
import EslintPluginReactConfig from 'eslint-plugin-react';
import EslintPluginReactHooks from 'eslint-plugin-react-hooks';
import EslintPluginReactRefresh from 'eslint-plugin-react-refresh';
/**
* Eslint Rules, plugins, and configurations follow the upward merge rules
*/
/** @type {import('eslint').Linter.Config} */
export default [
{
ignores: ['node_modules/**', 'build', 'src/components/VisualEffect']
},
{
files: ['**/*.js', '**/*.ts', '**/*.jsx', '**/*.tsx'],
languageOptions: {
globals: { ...globals.serviceworker, ...globals.browser, Buffer: true, process: true },
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
linterOptions: {
reportUnusedDisableDirectives: 'warn'
}
},
{
plugins: {
react: EslintPluginReactConfig,
'react-hooks': EslintPluginReactHooks,
'react-refresh': EslintPluginReactRefresh
},
rules: {
'@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],
'react-refresh/only-export-components': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/no-explicit-any': 'error',
'no-empty': ['error', { allowEmptyCatch: true }]
}
},
eslint.configs.recommended,
...tsEslint.configs.recommended,
EslintConfigPrettier
];