-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.json
201 lines (200 loc) · 6.04 KB
/
.eslintrc.json
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./.eslint.tsconfig.json",
"allowAutomaticSingleRunInference": false
},
"extends": [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jest/all",
"plugin:sonarjs/recommended",
"plugin:storybook/recommended",
"plugin:curology/recommended"
],
"plugins": ["@emotion"],
"globals": {
"document": false,
"window": false
},
"settings": {
"import/resolver": {
"node": {}
}
},
"rules": {
"@emotion/pkg-renaming": "error",
"@emotion/no-vanilla": "error",
"@emotion/syntax-preference": ["error", "string"],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Function": false,
"{}": false
},
"extendDefaults": true
}
],
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-ordering": [
"error",
{
"default": {
"memberTypes": ["field", "constructor", "method", "signature"],
"order": "alphabetically"
}
}
],
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"no-duplicate-imports": "off",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-require-imports": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "varsIgnorePattern": "^_" }
],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/sort-type-union-intersection-members": "off",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-parens": "off",
"dot-notation": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"import/extensions": [
"error",
{
"jpg": "always",
"png": "always",
"svg": "always",
"stories": "always",
"mock": "always"
}
],
"jest/prefer-lowercase-title": [
"error",
{
"ignore": ["describe"]
}
],
"jest/no-large-snapshots": "off",
"jest/prefer-called-with": "off",
"jest/prefer-expect-assertions": "off",
"jest/prefer-snapshot-hint": "off",
"jest/require-hook": "off",
"jest/valid-title": ["error", { "ignoreTypeOfDescribeName": true }],
"multiline-comment-style": "warn",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-underscore-dangle": [
"warn",
{
"allow": ["__isProxy", "__type"]
}
],
"react/function-component-definition": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".js", ".tsx"]
}
],
"react/require-default-props": [
"error",
{
"ignoreFunctionalComponents": true
}
],
"react/state-in-constructor": "off",
"react/static-property-placement": "off",
"sonarjs/no-nested-template-literals": "off",
"sort-imports": [
"warn",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
"allowSeparatedGroups": true
}
],
"storybook/default-exports": "off",
"storybook/story-exports": "off"
},
"overrides": [
{
"files": ["test.{ts,tsx}"],
"rules": {
"@typescript-eslint/no-unsafe-call": "off",
"no-undef": "off",
"react/jsx-props-no-spreading": "off"
}
},
{
"files": ["**/style.ts"],
"rules": {
"@typescript-eslint/restrict-template-expressions": "off",
"indent": "off"
}
},
{
"files": ["*.tsx"],
"rules": {
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off"
}
},
{
"files": ["src/icons/**/svgs/index.tsx"],
"rules": {
"prettier/prettier": "off"
}
},
{
"files": ["stories/**/*.{ts,tsx}"],
"rules": {
"no-alert": "off"
}
}
]
}