-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
53 lines (52 loc) · 1.33 KB
/
eslint.config.mjs
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
51
52
53
import pluginJs from '@eslint/js';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: pluginReactConfig.languageOptions,
plugins: {
react: reactPlugin,
},
rules: {
...pluginReactConfig.rules,
'react/no-string-refs': 0,
'react/display-name': 0,
'react/no-direct-mutation-state': 0,
'react/prop-types': 0,
'react/jsx-no-undef': 0,
'react/jsx-uses-react': 0,
'react/jsx-uses-vars': 0,
'react/no-danger-with-children': 0,
'react/require-render-return': 0,
'react/react-in-jsx-scope': 0,
},
},
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'react-hooks': reactHooksPlugin,
},
rules: {
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
},
];