@@ -8,7 +8,6 @@ module.exports = {
8
8
'plugin:@typescript-eslint/strict-type-checked' ,
9
9
'plugin:@typescript-eslint/stylistic-type-checked' ,
10
10
'plugin:unicorn/recommended' ,
11
- 'plugin:sonarjs/recommended-legacy' ,
12
11
'prettier' ,
13
12
] ,
14
13
parserOptions : {
@@ -105,7 +104,7 @@ module.exports = {
105
104
'no-template-curly-in-string' : 'error' ,
106
105
'no-unneeded-ternary' : 'error' ,
107
106
'no-unreachable-loop' : 'error' ,
108
- 'no-underscore-dangle' : [ 'error' , { allow : [ '__VERSION__' ] } ] ,
107
+ 'no-underscore-dangle' : [ 'error' , { allow : [ '__VERSION__' , '_errors' ] } ] ,
109
108
'no-unmodified-loop-condition' : 'error' ,
110
109
'no-unused-expressions' : 'error' ,
111
110
'no-unused-private-class-members' : 'error' ,
@@ -122,13 +121,6 @@ module.exports = {
122
121
'padding-line-between-statements' : 'error' ,
123
122
'prefer-arrow-callback' : 'error' ,
124
123
'prefer-const' : 'error' ,
125
- 'prefer-destructuring' : [
126
- 'error' ,
127
- {
128
- AssignmentExpression : { object : false , array : false } ,
129
- VariableDeclarator : { object : true , array : true } ,
130
- } ,
131
- ] ,
132
124
'prefer-exponentiation-operator' : 'error' ,
133
125
'prefer-named-capture-group' : 'error' ,
134
126
'prefer-numeric-literals' : 'error' ,
@@ -154,6 +146,7 @@ module.exports = {
154
146
'error' ,
155
147
{ ignoreArrowShorthand : true } ,
156
148
] ,
149
+ '@typescript-eslint/no-import-type-side-effects' : [ 'error' ] ,
157
150
'@typescript-eslint/no-shadow' : [ 'error' ] ,
158
151
'@typescript-eslint/no-unused-vars' : [
159
152
'warn' ,
@@ -170,6 +163,17 @@ module.exports = {
170
163
} ,
171
164
] ,
172
165
'@typescript-eslint/promise-function-async' : 'error' ,
166
+ '@typescript-eslint/restrict-template-expressions' : [
167
+ 'error' ,
168
+ {
169
+ allowAny : false ,
170
+ allowBoolean : true ,
171
+ allowNever : false ,
172
+ allowNullish : false ,
173
+ allowNumber : true ,
174
+ allowRegExp : false ,
175
+ } ,
176
+ ] ,
173
177
174
178
// Import sorting
175
179
'simple-import-sort/imports' : [
@@ -193,11 +197,7 @@ module.exports = {
193
197
] ,
194
198
'simple-import-sort/exports' : 'error' ,
195
199
196
- // Extra SonarJS rules
197
- 'sonarjs/cognitive-complexity' : [ 'error' , 20 ] ,
198
-
199
200
// Extra Unicorn rules
200
- 'unicorn/consistent-destructuring' : 'off' ,
201
201
'unicorn/custom-error-definition' : 'error' ,
202
202
'unicorn/no-null' : 'off' ,
203
203
'unicorn/no-unused-properties' : 'error' ,
@@ -217,24 +217,21 @@ module.exports = {
217
217
commonjs : true ,
218
218
} ,
219
219
rules : {
220
+ '@typescript-eslint/no-require-imports' : 'off' ,
221
+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
222
+ '@typescript-eslint/no-unsafe-call' : 'off' ,
223
+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
220
224
'@typescript-eslint/no-var-requires' : 'off' ,
221
225
} ,
222
226
} ,
223
- // __dirname and __filename are allowed in vite.config.ts
224
- {
225
- files : [ '**/vite.config.ts' , '**/vitest.config.ts' ] ,
226
- rules : {
227
- 'unicorn/prefer-module' : 'off' ,
228
- } ,
229
- } ,
230
227
// Rules for tests
231
228
{
232
229
files : [ '**/__tests__/**' , '**/*.test.ts' , '**/*.spec.ts' ] ,
233
230
extends : [ 'plugin:vitest/legacy-recommended' ] ,
234
231
rules : {
235
232
'@typescript-eslint/no-non-null-assertion' : 'off' ,
236
233
'@typescript-eslint/no-unsafe-assignment' : 'off' ,
237
- 'sonarjs/no-duplicate-string ' : 'off' ,
234
+ '@typescript-eslint/restrict-template-expressions ' : 'off' ,
238
235
'unicorn/consistent-function-scoping' : 'off' ,
239
236
'vitest/consistent-test-filename' : [
240
237
'error' ,
0 commit comments