-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
122 lines (122 loc) · 2.79 KB
/
.eslintrc
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es2024": true,
"jest": true,
"worker": true,
"serviceworker": true,
"webextensions": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:react/jsx-runtime"
],
"parserOptions": {
"project": "tsconfig.json",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"ecmaVersion": "latest",
"requireConfigFile": false,
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"unused-imports",
"simple-import-sort"
],
"rules": {
// Useful
"default-case": "error",
"no-multi-spaces": "error",
"simple-import-sort/imports": "warn",
"unused-imports/no-unused-imports": "warn",
"deprecation/deprecation": "error",
// Stylistic
"semi": [
"error",
"never"
],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true
}
],
// asd
"no-magic-numbers": "off",
"@typescript-eslint/no-magic-numbers": [
"error",
{
"ignore": [
0,
1,
-1
],
"ignoreArrayIndexes": true,
"ignoreEnums": true,
"ignoreNumericLiteralTypes": true,
"ignoreReadonlyClassProperties": true,
"ignoreTypeIndexes": true
}
],
// Curly & Parens
"arrow-parens": [
"warn",
"as-needed"
],
"object-curly-spacing": [
"error",
"always"
],
"curly": [
"error",
"multi-line",
"consistent"
],
// Function rules
"func-style": [
"error",
"declaration"
],
// OFF
"@typescript-eslint/end-of-line": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/prefer-function-type": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/ban-ts-comment": "off",
// OFF - React Hooks
"react-hooks/exhaustive-deps": "off"
},
"ignorePatterns": [
"node_modules",
"build",
"coverage"
]
}