@plumile/eslint-config-typescript 0.1.200 → 0.1.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/index.js +223 -363
- package/package.json +7 -11
package/README.md
CHANGED
|
@@ -15,8 +15,8 @@ The package provides:
|
|
|
15
15
|
- a `createConfig` helper for custom `tsconfig` locations
|
|
16
16
|
- a Relay-specific preset in `relay.js`
|
|
17
17
|
|
|
18
|
-
It is intended for projects that want Kronex's TypeScript, React
|
|
19
|
-
|
|
18
|
+
It is intended for projects that want Kronex's TypeScript, React hooks and
|
|
19
|
+
code-quality defaults without copying rule definitions manually.
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
@@ -31,9 +31,7 @@ npm install --save-dev \
|
|
|
31
31
|
@stylistic/eslint-plugin \
|
|
32
32
|
@typescript-eslint/eslint-plugin \
|
|
33
33
|
eslint-plugin-jsdoc \
|
|
34
|
-
eslint-plugin-jsx-a11y \
|
|
35
34
|
eslint-plugin-n \
|
|
36
|
-
eslint-plugin-react \
|
|
37
35
|
eslint-plugin-react-hooks \
|
|
38
36
|
eslint-plugin-sonarjs
|
|
39
37
|
```
|
|
@@ -100,7 +98,6 @@ export default [...plumileTs, ...relayPreset];
|
|
|
100
98
|
|
|
101
99
|
- TypeScript parsing and project-aware linting
|
|
102
100
|
- React hooks rules
|
|
103
|
-
- accessibility checks
|
|
104
101
|
- jsdoc and general code-quality rules
|
|
105
102
|
- stylistic rules aligned with the repository expectations
|
|
106
103
|
|
package/index.js
CHANGED
|
@@ -80,14 +80,11 @@ export function createConfig(options = {}) {
|
|
|
80
80
|
},
|
|
81
81
|
/* Rules applicable to all files (https://eslint.org/docs/rules) */
|
|
82
82
|
rules: {
|
|
83
|
-
|
|
84
|
-
'
|
|
83
|
+
// enforces return statements in callbacks of array's methods
|
|
84
|
+
'array-callback-return': ['error', { allowImplicit: true }],
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
'block-scoped-var': 'error', // treat var statements as if they were block scoped
|
|
89
|
-
|
|
90
|
-
complexity: ['off', 20], // specify the maximum cyclomatic complexity allowed in a program
|
|
86
|
+
// treat var statements as if they were block scoped
|
|
87
|
+
'block-scoped-var': 'error',
|
|
91
88
|
|
|
92
89
|
// enforce that class methods use "this"
|
|
93
90
|
'class-methods-use-this': [
|
|
@@ -101,58 +98,64 @@ export function createConfig(options = {}) {
|
|
|
101
98
|
'consistent-return': 'error',
|
|
102
99
|
|
|
103
100
|
// specify curly brace conventions for all control statements
|
|
104
|
-
|
|
101
|
+
// multiline
|
|
102
|
+
curly: ['error', 'multi-line'],
|
|
105
103
|
|
|
106
104
|
// require default case in switch statements
|
|
107
105
|
'default-case': ['error', { commentPattern: '^no default$' }],
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
// Enforce default clauses in switch statements to be last
|
|
108
|
+
'default-case-last': 'error',
|
|
110
109
|
|
|
111
110
|
'default-param-last': 'error',
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
// encourages use of dot notation whenever possible
|
|
113
|
+
'dot-notation': ['error', { allowKeywords: true }],
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
// enforces consistent newlines before or after dots
|
|
116
|
+
'dot-location': ['error', 'property'],
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
// require the use of === and !==
|
|
119
|
+
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
|
118
120
|
|
|
119
121
|
// Require grouped accessor pairs in object literals and classes
|
|
120
122
|
'grouped-accessor-pairs': 'error',
|
|
121
123
|
|
|
122
|
-
//
|
|
123
|
-
'
|
|
124
|
-
|
|
125
|
-
'max-classes-per-file': ['error', 1], // enforce a maximum number of classes per file
|
|
124
|
+
// enforce a maximum number of classes per file
|
|
125
|
+
'max-classes-per-file': ['error', 1],
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
// disallow the use of alert, confirm, and prompt
|
|
128
|
+
'no-alert': 2,
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
// disallow use of arguments.caller or arguments.callee
|
|
131
|
+
'no-caller': 'error',
|
|
130
132
|
|
|
131
|
-
|
|
133
|
+
// disallow lexical declarations in case/default clauses
|
|
134
|
+
'no-case-declarations': 'error',
|
|
132
135
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// disallow division operators explicitly at beginning of regular expression
|
|
136
|
-
'no-div-regex': 'off',
|
|
136
|
+
// Disallow returning value in constructor
|
|
137
|
+
'no-constructor-return': 'error',
|
|
137
138
|
|
|
138
139
|
// disallow else after a return in an if
|
|
139
140
|
'no-else-return': ['error', { allowElseIf: false }],
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
'no-empty-pattern': 'error', // disallow empty destructuring patterns
|
|
144
|
-
|
|
145
|
-
'no-eq-null': 'off', // disallow comparisons to null without a type-checking operator
|
|
142
|
+
// disallow empty destructuring patterns
|
|
143
|
+
'no-empty-pattern': 'error',
|
|
146
144
|
|
|
147
|
-
|
|
145
|
+
// disallow use of eval()
|
|
146
|
+
'no-eval': 'error',
|
|
148
147
|
|
|
149
|
-
|
|
148
|
+
// disallow adding to native types
|
|
149
|
+
'no-extend-native': 'error',
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
// disallow unnecessary function binding
|
|
152
|
+
'no-extra-bind': 'error',
|
|
152
153
|
|
|
153
|
-
|
|
154
|
+
// disallow Unnecessary Labels
|
|
155
|
+
'no-extra-label': 'error',
|
|
154
156
|
|
|
155
|
-
|
|
157
|
+
// disallow fallthrough of case statements
|
|
158
|
+
'no-fallthrough': 'error',
|
|
156
159
|
|
|
157
160
|
// disallow the use of leading or trailing decimal points in numeric literals
|
|
158
161
|
'no-floating-decimal': 'error',
|
|
@@ -160,32 +163,17 @@ export function createConfig(options = {}) {
|
|
|
160
163
|
// disallow reassignments of native objects or read-only globals
|
|
161
164
|
'no-global-assign': ['error', { exceptions: [] }],
|
|
162
165
|
|
|
163
|
-
// disallow
|
|
164
|
-
'no-
|
|
165
|
-
'off',
|
|
166
|
-
{
|
|
167
|
-
boolean: false,
|
|
168
|
-
number: true,
|
|
169
|
-
string: true,
|
|
170
|
-
allow: [],
|
|
171
|
-
},
|
|
172
|
-
],
|
|
173
|
-
|
|
174
|
-
'no-implicit-globals': 'off', // disallow var and named functions in global scope
|
|
175
|
-
|
|
176
|
-
'no-implied-eval': 0, // disallow use of eval()-like methods
|
|
177
|
-
|
|
178
|
-
// disallow this keywords outside of classes or class-like objects - checked by TS compiler
|
|
179
|
-
'no-invalid-this': 'off',
|
|
180
|
-
|
|
181
|
-
'no-iterator': 'error', // disallow usage of __iterator__ property
|
|
166
|
+
// disallow usage of __iterator__ property
|
|
167
|
+
'no-iterator': 'error',
|
|
182
168
|
|
|
183
169
|
// disallow use of labels for anything other than loops and switches
|
|
184
170
|
'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
|
|
185
171
|
|
|
186
|
-
|
|
172
|
+
// disallow unnecessary nested blocks
|
|
173
|
+
'no-lone-blocks': 'error',
|
|
187
174
|
|
|
188
|
-
|
|
175
|
+
// disallow creation of functions within loops
|
|
176
|
+
'no-loop-func': 'error',
|
|
189
177
|
|
|
190
178
|
// disallow use of multiple spaces
|
|
191
179
|
'no-multi-spaces': [
|
|
@@ -195,11 +183,14 @@ export function createConfig(options = {}) {
|
|
|
195
183
|
},
|
|
196
184
|
],
|
|
197
185
|
|
|
198
|
-
|
|
186
|
+
// disallow use of multiline strings
|
|
187
|
+
'no-multi-str': 'error',
|
|
199
188
|
|
|
200
|
-
|
|
189
|
+
// disallow use of new operator when not part of the assignment or comparison
|
|
190
|
+
'no-new': 'error',
|
|
201
191
|
|
|
202
|
-
|
|
192
|
+
// disallow use of new operator for Function object
|
|
193
|
+
'no-new-func': 'error',
|
|
203
194
|
|
|
204
195
|
// disallows creating new instances of String, Number, and Boolean
|
|
205
196
|
'no-new-wrappers': 'error',
|
|
@@ -207,7 +198,8 @@ export function createConfig(options = {}) {
|
|
|
207
198
|
// Disallow \8 and \9 escape sequences in string literals
|
|
208
199
|
'no-nonoctal-decimal-escape': 'error',
|
|
209
200
|
|
|
210
|
-
|
|
201
|
+
// disallow use of (old style) octal literals
|
|
202
|
+
'no-octal': 'error',
|
|
211
203
|
|
|
212
204
|
// disallow use of octal escape sequences in string literals, such as
|
|
213
205
|
// var foo = 'Copyright \251';
|
|
@@ -235,9 +227,11 @@ export function createConfig(options = {}) {
|
|
|
235
227
|
},
|
|
236
228
|
],
|
|
237
229
|
|
|
238
|
-
|
|
230
|
+
// disallow usage of __proto__ property
|
|
231
|
+
'no-proto': 'error',
|
|
239
232
|
|
|
240
|
-
|
|
233
|
+
// disallow declaring the same variable more than once
|
|
234
|
+
'no-redeclare': 'error',
|
|
241
235
|
|
|
242
236
|
// disallow certain object properties
|
|
243
237
|
'no-restricted-properties': [
|
|
@@ -295,9 +289,11 @@ export function createConfig(options = {}) {
|
|
|
295
289
|
// disallow use of assignment in return statement
|
|
296
290
|
'no-return-assign': ['error', 'always'],
|
|
297
291
|
|
|
298
|
-
|
|
292
|
+
// disallow redundant `return await`
|
|
293
|
+
'no-return-await': 'error',
|
|
299
294
|
|
|
300
|
-
|
|
295
|
+
// disallow use of `javascript:` urls.
|
|
296
|
+
'no-script-url': 'error',
|
|
301
297
|
|
|
302
298
|
// disallow self assignment
|
|
303
299
|
'no-self-assign': [
|
|
@@ -307,51 +303,36 @@ export function createConfig(options = {}) {
|
|
|
307
303
|
},
|
|
308
304
|
],
|
|
309
305
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
'no-sequences': 'error', // disallow use of comma operator
|
|
313
|
-
|
|
314
|
-
// restrict what can be thrown as an exception - handle by typescript-eslint
|
|
315
|
-
'no-throw-literal': 'off', // handle by only-throw-error in typescript-eslint
|
|
316
|
-
|
|
317
|
-
// disallow unmodified conditions of loops
|
|
318
|
-
'no-unmodified-loop-condition': 'off',
|
|
319
|
-
|
|
320
|
-
// disallow usage of expressions in statement position - handle by typescript-eslint
|
|
321
|
-
'no-unused-expressions': 0,
|
|
322
|
-
|
|
323
|
-
'no-unused-labels': 'error', // disallow unused labels
|
|
306
|
+
// disallow comparisons where both sides are exactly the same
|
|
307
|
+
'no-self-compare': 'error',
|
|
324
308
|
|
|
325
|
-
|
|
309
|
+
// disallow use of comma operator
|
|
310
|
+
'no-sequences': 'error',
|
|
326
311
|
|
|
327
|
-
|
|
312
|
+
// disallow unused labels
|
|
313
|
+
'no-unused-labels': 'error',
|
|
328
314
|
|
|
329
|
-
|
|
315
|
+
// Disallow unnecessary catch clauses
|
|
316
|
+
'no-useless-catch': 'error',
|
|
330
317
|
|
|
331
|
-
|
|
318
|
+
// disallow useless string concatenation
|
|
319
|
+
'no-useless-concat': 'error',
|
|
332
320
|
|
|
333
|
-
|
|
321
|
+
// disallow unnecessary string escaping
|
|
322
|
+
'no-useless-escape': 'error',
|
|
334
323
|
|
|
335
|
-
|
|
324
|
+
// disallow redundant return; keywords
|
|
325
|
+
'no-useless-return': 'error',
|
|
336
326
|
|
|
337
|
-
// disallow
|
|
338
|
-
'no-
|
|
339
|
-
'off',
|
|
340
|
-
{ terms: ['todo', 'fixme', 'xxx'], location: 'start' },
|
|
341
|
-
],
|
|
327
|
+
// disallow use of void operator
|
|
328
|
+
'no-void': 'error',
|
|
342
329
|
|
|
343
|
-
|
|
330
|
+
// disallow use of the with statement
|
|
331
|
+
'no-with': 'error',
|
|
344
332
|
|
|
345
333
|
// require using Error objects as Promise rejection reasons
|
|
346
334
|
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],
|
|
347
335
|
|
|
348
|
-
// Suggest using named capture group in regular expression
|
|
349
|
-
'prefer-named-capture-group': 'off',
|
|
350
|
-
|
|
351
|
-
// Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()
|
|
352
|
-
// TODO: semver-major: enable thus rule, once eslint v8.5.0 is required
|
|
353
|
-
'prefer-object-has-own': 'off',
|
|
354
|
-
|
|
355
336
|
// Disallow use of the RegExp constructor in favor of regular expression literals
|
|
356
337
|
'prefer-regex-literals': [
|
|
357
338
|
'error',
|
|
@@ -360,54 +341,64 @@ export function createConfig(options = {}) {
|
|
|
360
341
|
},
|
|
361
342
|
],
|
|
362
343
|
|
|
363
|
-
|
|
344
|
+
// require use of the second argument for parseInt()
|
|
345
|
+
radix: 'error',
|
|
364
346
|
|
|
365
|
-
//
|
|
366
|
-
'
|
|
367
|
-
|
|
368
|
-
// Enforce the use of u flag on RegExp
|
|
369
|
-
'require-unicode-regexp': 'off',
|
|
370
|
-
|
|
371
|
-
'vars-on-top': 'error', // requires to declare all vars on top of their containing scope
|
|
347
|
+
// requires to declare all vars on top of their containing scope
|
|
348
|
+
'vars-on-top': 'error',
|
|
372
349
|
|
|
373
350
|
// require immediate function invocation to be wrapped in parentheses
|
|
374
351
|
'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }],
|
|
375
352
|
|
|
376
|
-
|
|
353
|
+
// require or disallow Yoda conditions
|
|
354
|
+
yoda: 'error',
|
|
377
355
|
|
|
378
356
|
/* Enforce Errors rules */
|
|
379
357
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
'getter-return': ['error', { allowImplicit: true }], // Enforces that a return statement is present in property getters
|
|
358
|
+
// Enforce “for” loop update clause moving the counter in the right direction
|
|
359
|
+
'for-direction': 'error',
|
|
383
360
|
|
|
384
|
-
|
|
361
|
+
// Enforces that a return statement is present in property getters
|
|
362
|
+
'getter-return': ['error', { allowImplicit: true }],
|
|
385
363
|
|
|
386
|
-
|
|
364
|
+
// disallow using an async function as a Promise executor
|
|
365
|
+
'no-async-promise-executor': 'error',
|
|
387
366
|
|
|
388
|
-
|
|
367
|
+
// Disallow comparisons to negative zero
|
|
368
|
+
'no-compare-neg-zero': 'error',
|
|
389
369
|
|
|
390
|
-
|
|
370
|
+
// disallow assignment in conditional expressions
|
|
371
|
+
'no-cond-assign': ['error', 'always'],
|
|
391
372
|
|
|
392
|
-
|
|
373
|
+
// disallow use of console
|
|
374
|
+
'no-console': 'warn',
|
|
393
375
|
|
|
394
|
-
|
|
376
|
+
// Disallows expressions where the operation doesn't affect the value
|
|
377
|
+
'no-constant-binary-expression': 2,
|
|
395
378
|
|
|
396
|
-
|
|
379
|
+
// disallow use of constant expressions in conditions
|
|
380
|
+
'no-constant-condition': 'warn',
|
|
397
381
|
|
|
398
|
-
|
|
382
|
+
// disallow control characters in regular expressions
|
|
383
|
+
'no-control-regex': 'error',
|
|
399
384
|
|
|
400
|
-
|
|
385
|
+
// disallow use of debugger
|
|
386
|
+
'no-debugger': 'error',
|
|
401
387
|
|
|
402
|
-
|
|
388
|
+
// disallow duplicate arguments in functions
|
|
389
|
+
'no-dupe-args': 'error',
|
|
403
390
|
|
|
404
|
-
|
|
391
|
+
// Disallow duplicate conditions in if-else-if chains
|
|
392
|
+
'no-dupe-else-if': 'error',
|
|
405
393
|
|
|
406
|
-
|
|
394
|
+
// disallow duplicate keys when creating object literals
|
|
395
|
+
'no-dupe-keys': 'error',
|
|
407
396
|
|
|
408
|
-
|
|
397
|
+
// disallow a duplicate case label.
|
|
398
|
+
'no-duplicate-case': 'error',
|
|
409
399
|
|
|
410
|
-
|
|
400
|
+
// disallow empty statements
|
|
401
|
+
'no-empty': 'error',
|
|
411
402
|
|
|
412
403
|
// disallow the use of empty character classes in regular expressions
|
|
413
404
|
'no-empty-character-class': 'error',
|
|
@@ -418,17 +409,23 @@ export function createConfig(options = {}) {
|
|
|
418
409
|
// disallow double-negation boolean casts in a boolean context
|
|
419
410
|
'no-extra-boolean-cast': 'error',
|
|
420
411
|
|
|
421
|
-
|
|
412
|
+
// disallow overwriting functions written as function declarations
|
|
413
|
+
'no-func-assign': 'error',
|
|
422
414
|
|
|
423
|
-
|
|
415
|
+
// Disallow assigning to imported bindings
|
|
416
|
+
'no-import-assign': 'error',
|
|
424
417
|
|
|
425
|
-
|
|
418
|
+
// disallow function or variable declarations in nested blocks
|
|
419
|
+
'no-inner-declarations': 'error',
|
|
426
420
|
|
|
427
|
-
|
|
421
|
+
// disallow invalid regular expression strings in the RegExp constructor
|
|
422
|
+
'no-invalid-regexp': 'error',
|
|
428
423
|
|
|
429
|
-
|
|
424
|
+
// disallow irregular whitespace outside of strings and comments
|
|
425
|
+
'no-irregular-whitespace': 'error',
|
|
430
426
|
|
|
431
|
-
|
|
427
|
+
// Disallow Number Literals That Lose Precision
|
|
428
|
+
'no-loss-of-precision': 'error',
|
|
432
429
|
|
|
433
430
|
// Disallow characters which are made with multiple code points in character class syntax
|
|
434
431
|
'no-misleading-character-class': 'error',
|
|
@@ -442,11 +439,14 @@ export function createConfig(options = {}) {
|
|
|
442
439
|
// disallow use of Object.prototypes builtins directly
|
|
443
440
|
'no-prototype-builtins': 'error',
|
|
444
441
|
|
|
445
|
-
|
|
442
|
+
// disallow multiple spaces in a regular expression literal
|
|
443
|
+
'no-regex-spaces': 'error',
|
|
446
444
|
|
|
447
|
-
|
|
445
|
+
// Disallow returning values from setters
|
|
446
|
+
'no-setter-return': 'error',
|
|
448
447
|
|
|
449
|
-
|
|
448
|
+
// disallow sparse arrays
|
|
449
|
+
'no-sparse-arrays': 'error',
|
|
450
450
|
|
|
451
451
|
// Disallow template literal placeholder syntax in regular strings
|
|
452
452
|
'no-template-curly-in-string': 'error',
|
|
@@ -466,7 +466,8 @@ export function createConfig(options = {}) {
|
|
|
466
466
|
},
|
|
467
467
|
],
|
|
468
468
|
|
|
469
|
-
|
|
469
|
+
// disallow return/throw/break/continue inside finally blocks
|
|
470
|
+
'no-unsafe-finally': 'error',
|
|
470
471
|
|
|
471
472
|
// disallow negating the left operand of relational operators
|
|
472
473
|
'no-unsafe-negation': 'error',
|
|
@@ -477,15 +478,14 @@ export function createConfig(options = {}) {
|
|
|
477
478
|
{ disallowArithmeticOperators: true },
|
|
478
479
|
],
|
|
479
480
|
|
|
480
|
-
|
|
481
|
+
// Disallow Unused Private Class Members
|
|
482
|
+
'no-unused-private-class-members': 1,
|
|
481
483
|
|
|
482
|
-
|
|
484
|
+
// Disallow useless backreferences in regular expressions
|
|
485
|
+
'no-useless-backreference': 'error',
|
|
483
486
|
|
|
484
|
-
//
|
|
485
|
-
|
|
486
|
-
'require-atomic-updates': 0,
|
|
487
|
-
|
|
488
|
-
'use-isnan': 'error', // disallow comparisons with the value NaN
|
|
487
|
+
// disallow comparisons with the value NaN
|
|
488
|
+
'use-isnan': 'error',
|
|
489
489
|
|
|
490
490
|
// ensure that the results of typeof are compared against a valid string
|
|
491
491
|
'valid-typeof': ['error', { requireStringLiterals: true }],
|
|
@@ -494,17 +494,20 @@ export function createConfig(options = {}) {
|
|
|
494
494
|
// enforces no braces where they can be omitted
|
|
495
495
|
'arrow-body-style': ['error', 'always'],
|
|
496
496
|
|
|
497
|
-
|
|
497
|
+
// require parens in arrow function arguments
|
|
498
|
+
'arrow-parens': ['error', 'always'],
|
|
498
499
|
|
|
499
500
|
// require space before/after arrow function's arrow
|
|
500
501
|
'arrow-spacing': ['error', { before: true, after: true }],
|
|
501
502
|
|
|
502
|
-
|
|
503
|
+
// verify super() callings in constructors
|
|
504
|
+
'constructor-super': 'error',
|
|
503
505
|
|
|
504
506
|
// enforce the spacing around the * in generator functions
|
|
505
507
|
'generator-star-spacing': ['error', { before: false, after: true }],
|
|
506
508
|
|
|
507
|
-
|
|
509
|
+
// disallow modifying variables of class declarations
|
|
510
|
+
'no-class-assign': 'error',
|
|
508
511
|
|
|
509
512
|
// disallow arrow functions where they could be confused with comparisons
|
|
510
513
|
'no-confusing-arrow': [
|
|
@@ -514,13 +517,14 @@ export function createConfig(options = {}) {
|
|
|
514
517
|
},
|
|
515
518
|
],
|
|
516
519
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
'no-dupe-class-members': 0, // disallow duplicate class members - handle by typescript-eslint
|
|
520
|
+
// disallow modifying variables that are declared using const
|
|
521
|
+
'no-const-assign': 'error',
|
|
520
522
|
|
|
521
|
-
|
|
523
|
+
// disallow importing from the same path more than once
|
|
524
|
+
'no-duplicate-imports': 2,
|
|
522
525
|
|
|
523
|
-
|
|
526
|
+
// disallow symbol constructor
|
|
527
|
+
'no-new-symbol': 'error',
|
|
524
528
|
|
|
525
529
|
// Disallow specified names in exports
|
|
526
530
|
'no-restricted-exports': [
|
|
@@ -533,20 +537,11 @@ export function createConfig(options = {}) {
|
|
|
533
537
|
},
|
|
534
538
|
],
|
|
535
539
|
|
|
536
|
-
// disallow
|
|
537
|
-
'no-
|
|
538
|
-
'off',
|
|
539
|
-
{
|
|
540
|
-
paths: [],
|
|
541
|
-
patterns: [],
|
|
542
|
-
},
|
|
543
|
-
],
|
|
544
|
-
|
|
545
|
-
'no-this-before-super': 'error', // disallow to use this/super before super() calling in constructors.
|
|
540
|
+
// disallow to use this/super before super() calling in constructors.
|
|
541
|
+
'no-this-before-super': 'error',
|
|
546
542
|
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
'no-useless-constructor': 0, // disallow unnecessary constructor - handle by typescript-eslint
|
|
543
|
+
// disallow useless computed property keys
|
|
544
|
+
'no-useless-computed-key': 'error',
|
|
550
545
|
|
|
551
546
|
// disallow renaming import, export, and destructured assignments to the same name
|
|
552
547
|
'no-useless-rename': [
|
|
@@ -558,7 +553,8 @@ export function createConfig(options = {}) {
|
|
|
558
553
|
},
|
|
559
554
|
],
|
|
560
555
|
|
|
561
|
-
|
|
556
|
+
// require let or const instead of var
|
|
557
|
+
'no-var': 'error',
|
|
562
558
|
|
|
563
559
|
// require method and property shorthand syntax for object literals
|
|
564
560
|
'object-shorthand': [
|
|
@@ -606,68 +602,54 @@ export function createConfig(options = {}) {
|
|
|
606
602
|
},
|
|
607
603
|
],
|
|
608
604
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
'prefer-reflect': 'off', // suggest using Reflect methods where applicable
|
|
612
|
-
|
|
613
|
-
'prefer-rest-params': 'error', // use rest parameters instead of arguments
|
|
614
|
-
|
|
615
|
-
'prefer-spread': 'error', // suggest using the spread syntax instead of .apply()
|
|
616
|
-
|
|
617
|
-
'prefer-template': 'error', // suggest using template literals instead of string concatenation
|
|
618
|
-
|
|
619
|
-
'require-yield': 'error', // disallow generator functions that do not have yield
|
|
620
|
-
|
|
621
|
-
'rest-spread-spacing': ['error', 'never'], // enforce spacing between object rest-spread
|
|
622
|
-
|
|
623
|
-
// import sorting
|
|
624
|
-
'sort-imports': [
|
|
625
|
-
'off',
|
|
626
|
-
{
|
|
627
|
-
ignoreCase: false,
|
|
628
|
-
ignoreDeclarationSort: false,
|
|
629
|
-
ignoreMemberSort: false,
|
|
630
|
-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
631
|
-
},
|
|
632
|
-
],
|
|
633
|
-
|
|
634
|
-
'symbol-description': 'error', // require a Symbol description
|
|
605
|
+
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
|
|
606
|
+
'prefer-numeric-literals': 'error',
|
|
635
607
|
|
|
636
|
-
|
|
608
|
+
// use rest parameters instead of arguments
|
|
609
|
+
'prefer-rest-params': 'error',
|
|
637
610
|
|
|
638
|
-
|
|
611
|
+
// suggest using the spread syntax instead of .apply()
|
|
612
|
+
'prefer-spread': 'error',
|
|
639
613
|
|
|
640
|
-
|
|
614
|
+
// suggest using template literals instead of string concatenation
|
|
615
|
+
'prefer-template': 'error',
|
|
641
616
|
|
|
642
|
-
|
|
617
|
+
// disallow generator functions that do not have yield
|
|
618
|
+
'require-yield': 'error',
|
|
643
619
|
|
|
644
|
-
|
|
620
|
+
// enforce spacing between object rest-spread
|
|
621
|
+
'rest-spread-spacing': ['error', 'never'],
|
|
645
622
|
|
|
646
|
-
|
|
623
|
+
// require a Symbol description
|
|
624
|
+
'symbol-description': 'error',
|
|
647
625
|
|
|
648
|
-
|
|
626
|
+
// enforce usage of spacing in template strings
|
|
627
|
+
'template-curly-spacing': 'error',
|
|
649
628
|
|
|
650
|
-
|
|
629
|
+
// enforce spacing around the * in yield* expressions
|
|
630
|
+
'yield-star-spacing': ['error', 'after'],
|
|
651
631
|
|
|
652
|
-
|
|
632
|
+
// require all requires be top-level
|
|
633
|
+
'global-require': 'error',
|
|
653
634
|
|
|
654
|
-
|
|
635
|
+
// disallow use of the Buffer() constructor
|
|
636
|
+
'no-buffer-constructor': 'error',
|
|
655
637
|
|
|
656
|
-
|
|
638
|
+
// disallow use of new operator with the require function
|
|
639
|
+
'no-new-require': 'error',
|
|
657
640
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
'no-restricted-modules': 'off', // restrict usage of specified node modules
|
|
661
|
-
|
|
662
|
-
'no-sync': 'off', // disallow use of synchronous methods (off by default)
|
|
641
|
+
// disallow string concatenation with __dirname and __filename
|
|
642
|
+
'no-path-concat': 'error',
|
|
663
643
|
|
|
664
644
|
/* Enforce strict rules */
|
|
665
645
|
|
|
666
|
-
|
|
646
|
+
// babel inserts `'use strict';` for us
|
|
647
|
+
strict: ['error', 'never'],
|
|
667
648
|
|
|
668
649
|
/* Enforce style rules */
|
|
669
650
|
|
|
670
|
-
|
|
651
|
+
// disallow the use of ternary operators
|
|
652
|
+
'no-ternary': ['error'],
|
|
671
653
|
|
|
672
654
|
// disallow trailing whitespace at the end of lines
|
|
673
655
|
'no-trailing-spaces': [
|
|
@@ -678,17 +660,6 @@ export function createConfig(options = {}) {
|
|
|
678
660
|
},
|
|
679
661
|
],
|
|
680
662
|
|
|
681
|
-
// disallow dangling underscores in identifiers
|
|
682
|
-
'no-underscore-dangle': [
|
|
683
|
-
0,
|
|
684
|
-
{
|
|
685
|
-
allow: [],
|
|
686
|
-
allowAfterThis: false,
|
|
687
|
-
allowAfterSuper: false,
|
|
688
|
-
enforceInMethodNames: true,
|
|
689
|
-
},
|
|
690
|
-
],
|
|
691
|
-
|
|
692
663
|
// disallow the use of Boolean literals in conditional expressions
|
|
693
664
|
// also, prefer `a || b` over `a ? a : b`
|
|
694
665
|
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
@@ -703,34 +674,8 @@ export function createConfig(options = {}) {
|
|
|
703
674
|
{ overrides: {} },
|
|
704
675
|
],
|
|
705
676
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
// enforce line breaks between braces
|
|
709
|
-
'object-curly-newline': [
|
|
710
|
-
0,
|
|
711
|
-
{
|
|
712
|
-
ObjectExpression: {
|
|
713
|
-
minProperties: 4,
|
|
714
|
-
multiline: true,
|
|
715
|
-
consistent: true,
|
|
716
|
-
},
|
|
717
|
-
ObjectPattern: {
|
|
718
|
-
minProperties: 4,
|
|
719
|
-
multiline: true,
|
|
720
|
-
consistent: true,
|
|
721
|
-
},
|
|
722
|
-
ImportDeclaration: {
|
|
723
|
-
minProperties: 4,
|
|
724
|
-
multiline: true,
|
|
725
|
-
consistent: true,
|
|
726
|
-
},
|
|
727
|
-
ExportDeclaration: {
|
|
728
|
-
minProperties: 4,
|
|
729
|
-
multiline: true,
|
|
730
|
-
consistent: true,
|
|
731
|
-
},
|
|
732
|
-
},
|
|
733
|
-
],
|
|
677
|
+
// require padding inside curly braces
|
|
678
|
+
'@stylistic-eslint/object-curly-spacing': ['error', 'always'],
|
|
734
679
|
|
|
735
680
|
// enforce "same line" or "multiple line" on object properties.
|
|
736
681
|
'object-property-newline': [
|
|
@@ -740,15 +685,15 @@ export function createConfig(options = {}) {
|
|
|
740
685
|
},
|
|
741
686
|
],
|
|
742
687
|
|
|
743
|
-
|
|
688
|
+
// allow just one var statement per function
|
|
689
|
+
'one-var': ['error', 'never'],
|
|
744
690
|
|
|
745
|
-
|
|
691
|
+
// require a newline around variable declaration
|
|
692
|
+
'one-var-declaration-per-line': ['error', 'always'],
|
|
746
693
|
|
|
747
694
|
// require assignment operator shorthand where possible or prohibit it entirely
|
|
748
695
|
'operator-assignment': ['error', 'always'],
|
|
749
696
|
|
|
750
|
-
'@stylistic-eslint/operator-linebreak': 0,
|
|
751
|
-
|
|
752
697
|
// disallow padding within blocks
|
|
753
698
|
'@stylistic-eslint/padded-blocks': [
|
|
754
699
|
'error',
|
|
@@ -762,13 +707,11 @@ export function createConfig(options = {}) {
|
|
|
762
707
|
},
|
|
763
708
|
],
|
|
764
709
|
|
|
765
|
-
// Require or disallow padding lines between statements
|
|
766
|
-
'@stylistic-eslint/padding-line-between-statements': 'off',
|
|
767
|
-
|
|
768
710
|
// Disallow the use of Math.pow in favor of the ** operator
|
|
769
711
|
'prefer-exponentiation-operator': 'error',
|
|
770
712
|
|
|
771
|
-
|
|
713
|
+
// Prefer use of an object spread over Object.assign
|
|
714
|
+
'prefer-object-spread': 'error',
|
|
772
715
|
|
|
773
716
|
// require quotes around object literal property names
|
|
774
717
|
'@stylistic-eslint/quote-props': [
|
|
@@ -791,12 +734,8 @@ export function createConfig(options = {}) {
|
|
|
791
734
|
{ before: false, after: true },
|
|
792
735
|
],
|
|
793
736
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
// requires object keys to be sorted
|
|
797
|
-
'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }],
|
|
798
|
-
|
|
799
|
-
'sort-vars': 'off', // sort variables within the same declaration block
|
|
737
|
+
// Enforce location of semicolons
|
|
738
|
+
'@stylistic-eslint/semi-style': ['error', 'last'],
|
|
800
739
|
|
|
801
740
|
// require or disallow space before blocks
|
|
802
741
|
'@stylistic-eslint/space-before-blocks': 'error',
|
|
@@ -814,7 +753,8 @@ export function createConfig(options = {}) {
|
|
|
814
753
|
// require or disallow spaces inside parentheses
|
|
815
754
|
'@stylistic-eslint/space-in-parens': ['error', 'never'],
|
|
816
755
|
|
|
817
|
-
|
|
756
|
+
// require spaces around operators
|
|
757
|
+
'@stylistic-eslint/space-infix-ops': 'error',
|
|
818
758
|
|
|
819
759
|
// Require or disallow spaces before/after unary operators
|
|
820
760
|
'@stylistic-eslint/space-unary-ops': [
|
|
@@ -852,16 +792,12 @@ export function createConfig(options = {}) {
|
|
|
852
792
|
// Require or disallow spacing between template tags and their literals
|
|
853
793
|
'@stylistic-eslint/template-tag-spacing': ['error', 'never'],
|
|
854
794
|
|
|
855
|
-
|
|
795
|
+
// require or disallow the Unicode Byte Order Mark
|
|
796
|
+
'unicode-bom': ['error', 'never'],
|
|
856
797
|
|
|
857
|
-
'@stylistic-eslint/wrap-regex': 'off', // require regex literals to be wrapped in parentheses
|
|
858
|
-
|
|
859
|
-
/* Enforce variables rules */
|
|
860
|
-
'init-declarations': 'off',
|
|
861
|
-
'no-array-constructor': 'off', // disallow use of the Array constructor - handle by typescript-eslint
|
|
862
|
-
'no-catch-shadow': 'off',
|
|
863
798
|
'no-delete-var': 'error',
|
|
864
799
|
'no-label-var': 'error',
|
|
800
|
+
|
|
865
801
|
'no-restricted-globals': [
|
|
866
802
|
'error',
|
|
867
803
|
{
|
|
@@ -876,22 +812,14 @@ export function createConfig(options = {}) {
|
|
|
876
812
|
},
|
|
877
813
|
].concat(confusingBrowserGlobals),
|
|
878
814
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
'no-shadow-restricted-names': 'error', // disallow shadowing of names such as arguments
|
|
882
|
-
|
|
883
|
-
'no-undef': 'error', // disallow use of undeclared variables unless mentioned in a /*global */ block
|
|
884
|
-
|
|
885
|
-
'no-undef-init': 'error', // disallow use of undefined when initializing variables
|
|
886
|
-
|
|
887
|
-
// Alternative with no-undef-init , no-shadow-restricted-names, no-global-assign activated
|
|
888
|
-
'no-undefined': 'off', // disallow use of undefined variable
|
|
815
|
+
// disallow shadowing of names such as arguments
|
|
816
|
+
'no-shadow-restricted-names': 'error',
|
|
889
817
|
|
|
890
|
-
// disallow
|
|
891
|
-
'no-
|
|
818
|
+
// disallow use of undeclared variables unless mentioned in a /*global */ block
|
|
819
|
+
'no-undef': 'error',
|
|
892
820
|
|
|
893
|
-
// disallow use of
|
|
894
|
-
'no-
|
|
821
|
+
// disallow use of undefined when initializing variables
|
|
822
|
+
'no-undef-init': 'error',
|
|
895
823
|
|
|
896
824
|
'no-restricted-syntax': [
|
|
897
825
|
'error',
|
|
@@ -935,6 +863,7 @@ export function createConfig(options = {}) {
|
|
|
935
863
|
ignoreStrings: true,
|
|
936
864
|
},
|
|
937
865
|
],
|
|
866
|
+
|
|
938
867
|
'@typescript-eslint/naming-convention': [
|
|
939
868
|
'error',
|
|
940
869
|
{
|
|
@@ -1115,32 +1044,14 @@ export function createConfig(options = {}) {
|
|
|
1115
1044
|
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
1116
1045
|
},
|
|
1117
1046
|
],
|
|
1118
|
-
|
|
1119
|
-
'off',
|
|
1120
|
-
'all',
|
|
1121
|
-
{
|
|
1122
|
-
conditionalAssign: true,
|
|
1123
|
-
nestedBinaryExpressions: false,
|
|
1124
|
-
returnAssign: false,
|
|
1125
|
-
ignoreJSX: 'all', // delegate to eslint-plugin-react
|
|
1126
|
-
enforceForArrowConditionals: false,
|
|
1127
|
-
},
|
|
1128
|
-
],
|
|
1047
|
+
|
|
1129
1048
|
'@typescript-eslint/no-empty-function': [
|
|
1130
1049
|
'error',
|
|
1131
1050
|
{
|
|
1132
1051
|
allow: ['arrowFunctions', 'functions', 'methods'],
|
|
1133
1052
|
},
|
|
1134
1053
|
],
|
|
1135
|
-
|
|
1136
|
-
'off',
|
|
1137
|
-
{
|
|
1138
|
-
ignore: [],
|
|
1139
|
-
ignoreArrayIndexes: true,
|
|
1140
|
-
enforceConst: true,
|
|
1141
|
-
detectObjects: false,
|
|
1142
|
-
},
|
|
1143
|
-
],
|
|
1054
|
+
|
|
1144
1055
|
'@typescript-eslint/no-unused-expressions': [
|
|
1145
1056
|
'error',
|
|
1146
1057
|
{
|
|
@@ -1149,18 +1060,20 @@ export function createConfig(options = {}) {
|
|
|
1149
1060
|
allowTaggedTemplates: false,
|
|
1150
1061
|
},
|
|
1151
1062
|
],
|
|
1063
|
+
|
|
1152
1064
|
'@typescript-eslint/no-unused-vars': [
|
|
1153
1065
|
'error',
|
|
1154
1066
|
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
|
|
1155
1067
|
],
|
|
1068
|
+
|
|
1156
1069
|
'@typescript-eslint/no-use-before-define': [
|
|
1157
1070
|
'error',
|
|
1158
1071
|
{ functions: true, classes: true, variables: true },
|
|
1159
1072
|
],
|
|
1160
1073
|
|
|
1161
|
-
'@stylistic-eslint/adjacent-overload-signatures': 'off',
|
|
1162
1074
|
'@typescript-eslint/array-type': ['error'],
|
|
1163
1075
|
'@typescript-eslint/await-thenable': ['error'],
|
|
1076
|
+
|
|
1164
1077
|
'@typescript-eslint/ban-ts-comment': [
|
|
1165
1078
|
'error',
|
|
1166
1079
|
{
|
|
@@ -1168,32 +1081,29 @@ export function createConfig(options = {}) {
|
|
|
1168
1081
|
minimumDescriptionLength: 3,
|
|
1169
1082
|
},
|
|
1170
1083
|
],
|
|
1084
|
+
|
|
1171
1085
|
'@typescript-eslint/ban-tslint-comment': ['error'],
|
|
1172
1086
|
'@typescript-eslint/no-restricted-types': 2,
|
|
1173
1087
|
'@typescript-eslint/no-empty-object-type': 2,
|
|
1174
1088
|
'@typescript-eslint/no-unsafe-function-type': 2,
|
|
1175
1089
|
'@typescript-eslint/no-wrapper-object-types': 2,
|
|
1176
|
-
|
|
1177
|
-
'@stylistic-eslint/class-literal-property-style': 'off',
|
|
1090
|
+
|
|
1178
1091
|
'@stylistic-eslint/comma-spacing': [
|
|
1179
1092
|
'error',
|
|
1180
1093
|
{ before: false, after: true },
|
|
1181
1094
|
],
|
|
1095
|
+
|
|
1182
1096
|
'@typescript-eslint/consistent-generic-constructors': ['error'],
|
|
1097
|
+
|
|
1183
1098
|
'@typescript-eslint/consistent-indexed-object-style': [
|
|
1184
1099
|
'error',
|
|
1185
1100
|
'record',
|
|
1186
1101
|
],
|
|
1102
|
+
|
|
1187
1103
|
'@typescript-eslint/consistent-type-assertions': ['error'],
|
|
1188
|
-
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
1189
|
-
'@typescript-eslint/consistent-type-exports': 'off',
|
|
1190
|
-
'@typescript-eslint/consistent-type-imports': 'off',
|
|
1191
|
-
// Activate explicit-module-boundary-type as an alternative
|
|
1192
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
1193
1104
|
'@typescript-eslint/explicit-member-accessibility': ['error'],
|
|
1194
1105
|
'@typescript-eslint/explicit-module-boundary-types': 2,
|
|
1195
1106
|
'@/func-call-spacing': ['error', 'never'],
|
|
1196
|
-
'@stylistic-eslint/indent': 0,
|
|
1197
1107
|
'@stylistic-eslint/member-delimiter-style': ['error'],
|
|
1198
1108
|
'@typescript-eslint/member-ordering': ['error'],
|
|
1199
1109
|
'@typescript-eslint/method-signature-style': ['error'],
|
|
@@ -1202,7 +1112,6 @@ export function createConfig(options = {}) {
|
|
|
1202
1112
|
'@typescript-eslint/no-confusing-non-null-assertion': ['error'],
|
|
1203
1113
|
'@typescript-eslint/no-confusing-void-expression': ['error'],
|
|
1204
1114
|
'@typescript-eslint/no-duplicate-enum-values': ['error'],
|
|
1205
|
-
'@typescript-eslint/no-dupe-class-members': 0, // automatically checked by the TypeScript compiler
|
|
1206
1115
|
'@typescript-eslint/no-dynamic-delete': ['error'],
|
|
1207
1116
|
'@typescript-eslint/no-empty-interface': ['error'],
|
|
1208
1117
|
'@typescript-eslint/no-explicit-any': [2],
|
|
@@ -1221,7 +1130,6 @@ export function createConfig(options = {}) {
|
|
|
1221
1130
|
'@typescript-eslint/no-non-null-asserted-optional-chain': ['error'],
|
|
1222
1131
|
'@typescript-eslint/no-non-null-assertion': ['error'],
|
|
1223
1132
|
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
1224
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
1225
1133
|
'@typescript-eslint/no-this-alias': ['error'],
|
|
1226
1134
|
'@typescript-eslint/only-throw-error': 'error',
|
|
1227
1135
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error'],
|
|
@@ -1230,16 +1138,13 @@ export function createConfig(options = {}) {
|
|
|
1230
1138
|
'@typescript-eslint/no-unnecessary-type-arguments': ['error'],
|
|
1231
1139
|
'@typescript-eslint/no-unnecessary-type-assertion': ['error'],
|
|
1232
1140
|
'@typescript-eslint/no-unnecessary-type-constraint': ['error'],
|
|
1233
|
-
'@typescript-eslint/no-unsafe-argument': '
|
|
1234
|
-
'@typescript-eslint/no-unsafe-assignment':
|
|
1235
|
-
'@typescript-eslint/no-unsafe-call': ['
|
|
1236
|
-
'@typescript-eslint/no-unsafe-member-access': [
|
|
1237
|
-
'@typescript-eslint/no-unsafe-return': ['
|
|
1238
|
-
'@typescript-eslint/no-useless-empty-export': 'off',
|
|
1141
|
+
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
1142
|
+
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
1143
|
+
'@typescript-eslint/no-unsafe-call': ['error'],
|
|
1144
|
+
'@typescript-eslint/no-unsafe-member-access': ['error'],
|
|
1145
|
+
'@typescript-eslint/no-unsafe-return': ['error'],
|
|
1239
1146
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
1240
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
1241
1147
|
'@typescript-eslint/non-nullable-type-assertion-style': ['error'],
|
|
1242
|
-
'@typescript-eslint/parameter-properties': 'off',
|
|
1243
1148
|
'@typescript-eslint/prefer-as-const': ['error'],
|
|
1244
1149
|
'@typescript-eslint/prefer-enum-initializers': ['error'],
|
|
1245
1150
|
'@typescript-eslint/prefer-for-of': ['error'],
|
|
@@ -1249,8 +1154,6 @@ export function createConfig(options = {}) {
|
|
|
1249
1154
|
'@typescript-eslint/prefer-namespace-keyword': ['error'],
|
|
1250
1155
|
'@typescript-eslint/prefer-nullish-coalescing': ['error'],
|
|
1251
1156
|
'@typescript-eslint/prefer-optional-chain': ['error'],
|
|
1252
|
-
'@typescript-eslint/prefer-readonly-parameter-types': 'off', // ['error'],
|
|
1253
|
-
'@typescript-eslint/prefer-readonly': 'off',
|
|
1254
1157
|
'@typescript-eslint/prefer-reduce-type-parameter': ['error'],
|
|
1255
1158
|
'@typescript-eslint/prefer-regexp-exec': ['error'],
|
|
1256
1159
|
'@typescript-eslint/prefer-return-this-type': ['error'],
|
|
@@ -1262,55 +1165,12 @@ export function createConfig(options = {}) {
|
|
|
1262
1165
|
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
|
|
1263
1166
|
'@typescript-eslint/triple-slash-reference': ['error'],
|
|
1264
1167
|
'@stylistic-eslint/type-annotation-spacing': ['error'],
|
|
1265
|
-
'@typescript-eslint/typedef': 'off',
|
|
1266
1168
|
'@typescript-eslint/unbound-method': ['error'],
|
|
1267
1169
|
'@typescript-eslint/unified-signatures': ['error'],
|
|
1268
|
-
|
|
1269
|
-
'brace-style': 'off',
|
|
1270
1170
|
'func-style': ['error', 'declaration'],
|
|
1271
|
-
|
|
1272
1171
|
'no-continue': 1,
|
|
1273
|
-
|
|
1274
|
-
'jsdoc/require-param-description': 0,
|
|
1275
|
-
'jsdoc/require-param-type': 0,
|
|
1276
|
-
'jsdoc/require-param': 0,
|
|
1277
|
-
'jsdoc/require-returns-type': 0,
|
|
1278
|
-
'jsdoc/require-returns': 0,
|
|
1279
|
-
'jsdoc/require-yields': 0,
|
|
1280
|
-
|
|
1281
|
-
camelcase: 'off',
|
|
1282
|
-
|
|
1283
|
-
indent: 'off',
|
|
1284
|
-
|
|
1285
1172
|
'sonarjs/no-duplicate-string': 'error',
|
|
1286
|
-
// Lot of new rules, we disable them for now
|
|
1287
|
-
'sonarjs/concise-regex': 0,
|
|
1288
|
-
'sonarjs/default-param-last': 0,
|
|
1289
|
-
'sonarjs/deprecation': 0,
|
|
1290
|
-
'sonarjs/duplicates-in-character-class': 0,
|
|
1291
|
-
'sonarjs/function-return-type': 0,
|
|
1292
|
-
'sonarjs/hashing': 0,
|
|
1293
|
-
'sonarjs/no-base-to-string': 0,
|
|
1294
|
-
'sonarjs/no-commented-code': 0,
|
|
1295
|
-
'sonarjs/no-dead-store': 0,
|
|
1296
1173
|
'sonarjs/no-duplicate-string': 1,
|
|
1297
|
-
'sonarjs/no-empty-function': 0,
|
|
1298
|
-
'sonarjs/no-hardcoded-credentials': 0,
|
|
1299
|
-
'sonarjs/no-ignored-exceptions': 0,
|
|
1300
|
-
'sonarjs/no-incomplete-assertions': 0,
|
|
1301
|
-
'sonarjs/no-misused-promises': 0,
|
|
1302
|
-
'sonarjs/no-nested-functions': 0,
|
|
1303
|
-
'sonarjs/no-redundant-optional': 0,
|
|
1304
|
-
'sonarjs/no-redundant-type-constituents': 0,
|
|
1305
|
-
'sonarjs/no-useless-intersection': 0,
|
|
1306
|
-
'sonarjs/prefer-for-of': 0,
|
|
1307
|
-
'sonarjs/pseudo-random': 0,
|
|
1308
|
-
'sonarjs/redundant-type-aliases': 0,
|
|
1309
|
-
'sonarjs/single-character-alternation': 0,
|
|
1310
|
-
'sonarjs/slow-regex': 0,
|
|
1311
|
-
'sonarjs/sonar-no-control-regex': 0,
|
|
1312
|
-
'sonarjs/sonar-no-unused-vars': 0,
|
|
1313
|
-
'sonarjs/todo-tag': 0,
|
|
1314
1174
|
},
|
|
1315
1175
|
},
|
|
1316
1176
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Olivier Hardy <olivier@plumile.com>",
|
|
3
3
|
"name": "@plumile/eslint-config-typescript",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.205",
|
|
5
5
|
"description": "Shared ESLint flat config tuned for TypeScript-forward React projects",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -31,29 +31,25 @@
|
|
|
31
31
|
"npm": ">=8.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@typescript-eslint/parser": "8.
|
|
34
|
+
"@typescript-eslint/parser": "8.67.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
38
38
|
"eslint": "10.1.0",
|
|
39
|
-
"eslint-plugin-jsdoc": "64.0
|
|
40
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
39
|
+
"eslint-plugin-jsdoc": "64.1.0",
|
|
41
40
|
"eslint-plugin-n": "18.3.0",
|
|
42
|
-
"eslint-plugin-react": "7.37.5",
|
|
43
41
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
44
|
-
"eslint-plugin-relay": "2.
|
|
42
|
+
"eslint-plugin-relay": "2.1.0",
|
|
45
43
|
"eslint-plugin-sonarjs": "4.2.0"
|
|
46
44
|
},
|
|
47
45
|
"peerDependencies": {
|
|
48
46
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": ">=8.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": ">=8.67.0",
|
|
50
48
|
"eslint": "10.x.x",
|
|
51
|
-
"eslint-plugin-jsdoc": ">=64.0
|
|
52
|
-
"eslint-plugin-jsx-a11y": ">=6.10.2",
|
|
49
|
+
"eslint-plugin-jsdoc": ">=64.1.0",
|
|
53
50
|
"eslint-plugin-n": "18.3.0",
|
|
54
|
-
"eslint-plugin-react": ">=7.37.5",
|
|
55
51
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
56
|
-
"eslint-plugin-relay": ">=2.
|
|
52
|
+
"eslint-plugin-relay": ">=2.1.0",
|
|
57
53
|
"eslint-plugin-sonarjs": ">=4.2.0"
|
|
58
54
|
},
|
|
59
55
|
"files": [
|