-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
63 lines (58 loc) · 1.56 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
51
52
53
54
55
56
57
58
59
60
61
62
63
import pluginJs from '@eslint/js';
import a11yPlugin from 'eslint-plugin-jsx-a11y';
import pluginPrettier from 'eslint-plugin-prettier/recommended';
import pluginReact from 'eslint-plugin-react';
import pluginReactHook from 'eslint-plugin-react-hooks';
import globals from 'globals';
import tseslint from 'typescript-eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { globals: globals.browser } },
{
settings: {
react: {
version: 'detect',
},
},
},
pluginJs.configs.recommended,
a11yPlugin.flatConfigs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
pluginPrettier,
{
plugins: {
'react-hooks': pluginReactHook,
},
rules: {
...pluginReactHook.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 0,
'react/jsx-props-no-spreading': 0,
'react/require-default-props': 'off',
'react/display-name': 'off',
'react/jsx-no-useless-fragment': [
'warn',
{
allowExpressions: true,
},
],
'import/no-extraneous-dependencies': [
'off',
{
devDependencies: true,
},
],
'no-restricted-exports': 'off',
'react/function-component-definition': 'off',
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'enum',
format: ['PascalCase', 'UPPER_CASE', 'camelCase'],
},
],
},
},
];