-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
74 lines (74 loc) · 1.83 KB
/
.eslintrc.cjs
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
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
plugins: ['react-refresh'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
settings: {
'import/resolver': {
typescript: true,
node: true,
},
react: {
version: 'detect',
},
},
rules: {
'no-unused-labels': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'no-multiple-empty-lines': ['error', { max: 1 }],
'@typescript-eslint/consistent-type-imports': 'error',
'import/order': [
'error',
{
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
pathGroups: [
{
pattern: '@src/**',
group: 'parent',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
distinctGroup: false,
},
],
'import/no-duplicates': 'error',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'react-refresh/only-export-components': 'warn',
'react/jsx-no-comment-textnodes': 'off',
'react/no-unescaped-entities': 'off',
},
};