-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
104 lines (103 loc) · 2.9 KB
/
eslint.config.js
File metadata and controls
104 lines (103 loc) · 2.9 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import pluginJs from '@eslint/js';
import pluginImport from 'eslint-plugin-import';
import pluginJest from 'eslint-plugin-jest';
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
import pluginN from 'eslint-plugin-n';
import pluginPrettier from 'eslint-plugin-prettier';
import pluginPromise from 'eslint-plugin-promise';
import pluginReact from 'eslint-plugin-react';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import pluginStorybook from 'eslint-plugin-storybook';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'**/node_modules',
'packages/react-art/npm/lib',
'build/',
'build2/',
'coverage/',
'fixtures/',
'scripts/bench/benchmarks/**/*.js',
'scripts/bench/remote-repo/',
'packages/react-devtools-core/dist',
'packages/react-devtools-extensions/chrome/build',
'packages/react-devtools-extensions/firefox/build',
'packages/react-devtools-extensions/shared/build',
'packages/react-devtools-extensions/src/ErrorTesterCompiled.js',
'packages/react-devtools-inline/dist',
'packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/',
'packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/',
'packages/react-devtools-shell/dist',
'packages/react-devtools-scheduling-profiler/dist',
'packages/react-devtools-scheduling-profiler/static',
'dist/'
]
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.jest,
...globals.node
}
},
plugins: {
react: pluginReact,
'react-hooks': pluginReactHooks,
prettier: pluginPrettier,
jest: pluginJest,
'simple-import-sort': pluginSimpleImportSort,
storybook: pluginStorybook,
import: pluginImport,
n: pluginN,
promise: pluginPromise,
'jsx-a11y': pluginJsxA11y
},
settings: {
react: {
version: 'detect'
}
},
rules: {
...pluginReact.configs.recommended.rules,
...pluginReactHooks.configs.recommended.rules,
...pluginStorybook.configs.recommended.rules,
'prettier/prettier': [
'error',
{
singleQuote: true
}
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/ban-types': 'off'
}
},
{
files: ['**/*.cjs'],
languageOptions: {
globals: {
...globals.node
}
}
}
);