/
ts.json
206 lines (176 loc) · 5.25 KB
/
ts.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
202
203
204
205
206
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"rules": {
"import/no-unused-modules": "off"
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.vue"],
"extends": [
"plugin:import/typescript",
"plugin:@typescript-eslint/all",
"./ts-for-js.json",
"./prettier.json"
],
"plugins": [
"import",
"eslint-plugin-no-explicit-type-exports",
"etc",
"total-functions",
"sonar"
],
"rules": {
"@typescript-eslint/no-magic-numbers": [
"error",
{
"ignore": [0, 1],
"enforceConst": true,
"ignoreDefaultValues": true,
"ignoreClassFieldInitialValues": true,
"ignoreEnums": true,
"ignoreNumericLiteralTypes": true,
"ignoreReadonlyClassProperties": true,
"ignoreTypeIndexes": true
}
],
"@typescript-eslint/no-unused-expressions": [
"error",
{ "enforceForJSX": true }
],
"@typescript-eslint/no-shadow": [
"error",
{
"builtinGlobals": true,
"allow": [
"defaultStatus",
"event",
"find",
"length",
"name",
"status"
]
}
],
"@typescript-eslint/prefer-readonly-parameter-types": [
"error",
{ "ignoreInferredTypes": true }
],
"@typescript-eslint/no-use-before-define": [
"error",
{ "ignoreTypeReferences": false }
],
"@typescript-eslint/no-meaningless-void-operator": [
"error",
{ "checkNever": true }
],
"@typescript-eslint/consistent-indexed-object-style": [
"error",
"index-signature"
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{ "assertionStyle": "never" }
],
"@typescript-eslint/switch-exhaustiveness-check": [
"error",
{ "requireDefaultForNonUnion": true }
],
"prefer-destructuring": "off",
"@typescript-eslint/prefer-destructuring": [
"error",
{ "array": true, "object": true },
{
"enforceForRenamedProperties": true,
"enforceForDeclarationWithTypeAnnotation": true
}
],
"@shopify/typescript/prefer-singular-enums": "error",
"import/extensions": ["error", "never"],
"import/no-unused-modules": [
"error",
{ "missingExports": false, "unusedExports": true }
],
"import/max-dependencies": ["error", { "ignoreTypeImports": true }],
"no-explicit-type-exports/no-explicit-type-exports": "error",
"etc/no-const-enum": "error",
"etc/no-enum": "error",
"etc/no-implicit-any-catch": "error",
"etc/no-misused-generics": "error",
"etc/no-t": "error",
"etc/prefer-interface": ["error", { "allowIntersection": false }],
"total-functions/no-unsafe-readonly-mutable-assignment": "error",
"total-functions/require-strict-mode": "error",
"total-functions/no-partial-url-constructor": "error",
"total-functions/no-partial-division": "error",
"total-functions/no-partial-string-normalize": "error",
"total-functions/no-premature-fp-ts-effects": "error",
"total-functions/no-partial-array-reduce": "error",
"total-functions/no-nested-fp-ts-effects": "error",
"sonar/public-static-readonly": "error",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-restricted-imports": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/class-methods-use-this": "off",
"@typescript-eslint/no-array-delete": "off",
"@typescript-eslint/prefer-find": "off"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
},
"node": {
"tryExtensions": [
".mjs",
".cjs",
".js",
".json",
".node",
".mts",
".cts",
".ts",
".d.ts"
]
}
}
},
{
"files": [
"**/test/**",
"**/tests/**",
"**/spec/**",
"**/__tests__/**",
"*.test.*",
"*.spec.*",
"*.e2e.*",
"*.e2e-spec.*"
],
"rules": {
"@typescript-eslint/no-shadow": [
"error",
{
"builtinGlobals": true,
"allow": [
"defaultStatus",
"event",
"find",
"length",
"name",
"status",
"screen"
]
}
],
"@typescript-eslint/no-magic-numbers": "off"
}
}
],
"ignorePatterns": ["*.d.ts"]
}