-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
88 lines (88 loc) · 2.1 KB
/
.eslintrc.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
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:cypress/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'react-hooks', 'import', 'cypress'],
ignorePatterns: ['*.scss'],
rules: {
'react/jsx-uses-react': 0,
'react/react-in-jsx-scope': 0,
'react/display-name': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-interface': 'warn',
'no-empty': 'warn',
'prefer-const': 'warn',
'@typescript-eslint/no-var-requires': 0,
'import/no-named-as-default-member': 0,
'import/newline-after-import': 'warn',
'import/no-duplicates': 'error',
'import/order': [
'warn',
{
'newlines-between': 'never',
groups: [
'builtin',
'external',
'object',
'internal',
'index',
'sibling',
'parent',
],
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before',
},
{
pattern: './*.module.scss',
group: 'parent',
},
],
pathGroupsExcludedImportTypes: ['react'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
settings: {
react: {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/'],
},
},
},
};