-
Notifications
You must be signed in to change notification settings - Fork 393
/
eslint.config.mjs
97 lines (95 loc) · 2.32 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
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
import algolia from 'eslint-config-algolia/flat/base.js';
import algoliaReact from 'eslint-config-algolia/flat/react.js';
import algoliaTypescript from 'eslint-config-algolia/flat/typescript.js';
import cypresss from 'eslint-plugin-cypress/flat'; // eslint-disable-line import/no-unresolved
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint'; // eslint-disable-line import/no-unresolved
export default [
...algolia,
...algoliaReact,
...algoliaTypescript,
{
ignores: ['**/node_modules/', '**/dist/', '**/build/', '.yarn/', '**/.docusaurus'],
},
{
plugins: {
'react-refresh': reactRefresh,
},
languageOptions: {
parserOptions: {
projectService: true,
},
},
settings: {
react: {
pragma: 'React',
version: 'detect',
},
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.tsx'],
},
},
},
rules: {
'no-param-reassign': 0,
'valid-jsdoc': 0,
'no-shadow': 0,
'prefer-template': 0,
'react/prop-types': 0,
'react/no-unescaped-entities': 0,
'import/extensions': 0,
'no-unused-expressions': 0,
complexity: 0,
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: '@/**/*',
group: 'parent',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
// TMP
'react/function-component-definition': ['off'],
'react/jsx-filename-extension': ['off'],
'jsdoc/check-examples': ['off'],
},
},
{
files: ['**/*.js'],
},
tseslint.configs.disableTypeChecked,
{
files: ['cypress/**/*'],
plugins: {
cypresss,
},
rules: {
'@typescript-eslint/triple-slash-reference': 0,
},
},
{
files: ['packages/website/**/*'],
rules: {
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,
},
},
{
files: ['examples/demo/**/*'],
rules: {
'react/react-in-jsx-scope': 0,
},
},
];