@newsteam/eslint-config 1.2.13 → 1.2.14
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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -24
- package/dist/plugins/array-function.js +5 -5
- package/dist/plugins/css-modules.js +2 -2
- package/dist/plugins/destructuring.js +2 -2
- package/dist/plugins/eslint-comments.js +19 -19
- package/dist/plugins/import-newlines.js +1 -1
- package/dist/plugins/import-x.js +19 -19
- package/dist/plugins/newline-destructuring.js +1 -1
- package/dist/plugins/next.js +21 -21
- package/dist/plugins/no-unsanitized.js +2 -2
- package/dist/plugins/no-useless-assign.js +1 -1
- package/dist/plugins/node.js +31 -31
- package/dist/plugins/perfectionist.d.ts.map +1 -1
- package/dist/plugins/perfectionist.js +21 -20
- package/dist/plugins/promise.js +13 -13
- package/dist/plugins/react-19-upgrade.js +7 -7
- package/dist/plugins/react-compiler.js +1 -1
- package/dist/plugins/react-hooks.js +22 -22
- package/dist/plugins/react-perf.js +1 -1
- package/dist/plugins/react-refresh.js +1 -1
- package/dist/plugins/react.js +69 -69
- package/dist/plugins/security.js +13 -13
- package/dist/plugins/sort-react-dependency-arrays.js +1 -1
- package/dist/plugins/stylistic.d.ts.map +1 -1
- package/dist/plugins/stylistic.js +102 -88
- package/dist/plugins/typescript.d.ts.map +1 -1
- package/dist/plugins/typescript.js +164 -126
- package/dist/plugins/unicorn.js +127 -127
- package/dist/rules.js +186 -186
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +0 -1
- package/package.json +38 -44
- package/dist/plugins/const-case.d.ts +0 -3
- package/dist/plugins/const-case.d.ts.map +0 -1
- package/dist/plugins/const-case.js +0 -16
- package/dist/plugins/more.d.ts +0 -3
- package/dist/plugins/more.d.ts.map +0 -1
- package/dist/plugins/more.js +0 -101
package/dist/plugins/react.js
CHANGED
|
@@ -15,32 +15,32 @@ export const reactPlugin = [
|
|
|
15
15
|
*
|
|
16
16
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md
|
|
17
17
|
*/
|
|
18
|
-
"react/boolean-prop-naming": "
|
|
18
|
+
"react/boolean-prop-naming": "warn",
|
|
19
19
|
/*
|
|
20
20
|
* Forbid "button" element without an explicit "type" attribute
|
|
21
21
|
*
|
|
22
22
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
|
|
23
23
|
*/
|
|
24
|
-
"react/button-has-type": "
|
|
24
|
+
"react/button-has-type": "warn",
|
|
25
25
|
/*
|
|
26
26
|
* Enforce using onChange or readonly attribute when checked is used
|
|
27
27
|
*
|
|
28
28
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
|
|
29
29
|
*/
|
|
30
|
-
"react/checked-requires-onchange-or-readonly": "
|
|
30
|
+
"react/checked-requires-onchange-or-readonly": "warn",
|
|
31
31
|
/*
|
|
32
32
|
* Prevent extraneous defaultProps on components
|
|
33
33
|
*
|
|
34
34
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
|
|
35
35
|
*/
|
|
36
|
-
"react/default-props-match-prop-types": "
|
|
36
|
+
"react/default-props-match-prop-types": "warn",
|
|
37
37
|
/*
|
|
38
38
|
* Rule enforces consistent usage of destructuring assignment in component
|
|
39
39
|
*
|
|
40
40
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
|
|
41
41
|
*/
|
|
42
42
|
"react/destructuring-assignment": [
|
|
43
|
-
"
|
|
43
|
+
"warn",
|
|
44
44
|
"always",
|
|
45
45
|
{
|
|
46
46
|
destructureInSignature: "ignore",
|
|
@@ -68,38 +68,38 @@ export const reactPlugin = [
|
|
|
68
68
|
*
|
|
69
69
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md
|
|
70
70
|
*/
|
|
71
|
-
"react/forbid-dom-props": "
|
|
71
|
+
"react/forbid-dom-props": "warn",
|
|
72
72
|
/*
|
|
73
73
|
* Forbid certain elements
|
|
74
74
|
*
|
|
75
75
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md
|
|
76
76
|
*/
|
|
77
|
-
"react/forbid-elements": "
|
|
77
|
+
"react/forbid-elements": "warn",
|
|
78
78
|
/*
|
|
79
79
|
* Forbid foreign propTypes
|
|
80
80
|
*
|
|
81
81
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
|
|
82
82
|
*/
|
|
83
|
-
"react/forbid-foreign-prop-types": "
|
|
83
|
+
"react/forbid-foreign-prop-types": "warn",
|
|
84
84
|
/*
|
|
85
85
|
* Forbid certain propTypes
|
|
86
86
|
*
|
|
87
87
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
|
|
88
88
|
*/
|
|
89
|
-
"react/forbid-prop-types": "
|
|
89
|
+
"react/forbid-prop-types": "warn",
|
|
90
90
|
/*
|
|
91
91
|
* Require all forwardRef components include a ref parameter
|
|
92
92
|
*
|
|
93
93
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
|
|
94
94
|
*/
|
|
95
|
-
"react/forward-ref-uses-ref": "
|
|
95
|
+
"react/forward-ref-uses-ref": "warn",
|
|
96
96
|
/*
|
|
97
97
|
* Enforce a specific function type for function components
|
|
98
98
|
*
|
|
99
99
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
|
|
100
100
|
*/
|
|
101
101
|
"react/function-component-definition": [
|
|
102
|
-
"
|
|
102
|
+
"warn",
|
|
103
103
|
{
|
|
104
104
|
namedComponents: "arrow-function",
|
|
105
105
|
unnamedComponents: "arrow-function",
|
|
@@ -110,19 +110,19 @@ export const reactPlugin = [
|
|
|
110
110
|
*
|
|
111
111
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
|
|
112
112
|
*/
|
|
113
|
-
"react/hook-use-state": "
|
|
113
|
+
"react/hook-use-state": "warn",
|
|
114
114
|
/*
|
|
115
115
|
* Enforce sandbox attribute on iframe elements
|
|
116
116
|
*
|
|
117
117
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
|
|
118
118
|
*/
|
|
119
|
-
"react/iframe-missing-sandbox": "
|
|
119
|
+
"react/iframe-missing-sandbox": "warn",
|
|
120
120
|
/*
|
|
121
121
|
* Enforce boolean attributes notation in JSX (fixable)
|
|
122
122
|
*
|
|
123
123
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
|
|
124
124
|
*/
|
|
125
|
-
"react/jsx-boolean-value": "
|
|
125
|
+
"react/jsx-boolean-value": "warn",
|
|
126
126
|
/*
|
|
127
127
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
|
|
128
128
|
*
|
|
@@ -193,7 +193,7 @@ export const reactPlugin = [
|
|
|
193
193
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
194
194
|
*/
|
|
195
195
|
"react/jsx-filename-extension": [
|
|
196
|
-
"
|
|
196
|
+
"warn",
|
|
197
197
|
{
|
|
198
198
|
extensions: [
|
|
199
199
|
".js",
|
|
@@ -217,7 +217,7 @@ export const reactPlugin = [
|
|
|
217
217
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
|
|
218
218
|
*/
|
|
219
219
|
"react/jsx-fragments": [
|
|
220
|
-
"
|
|
220
|
+
"warn",
|
|
221
221
|
"syntax",
|
|
222
222
|
],
|
|
223
223
|
/*
|
|
@@ -225,7 +225,7 @@ export const reactPlugin = [
|
|
|
225
225
|
*
|
|
226
226
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
227
227
|
*/
|
|
228
|
-
"react/jsx-handler-names": "
|
|
228
|
+
"react/jsx-handler-names": "warn",
|
|
229
229
|
/*
|
|
230
230
|
* Validate JSX indentation (fixable)
|
|
231
231
|
*
|
|
@@ -247,14 +247,14 @@ export const reactPlugin = [
|
|
|
247
247
|
*
|
|
248
248
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
|
|
249
249
|
*/
|
|
250
|
-
"react/jsx-key": "
|
|
250
|
+
"react/jsx-key": "warn",
|
|
251
251
|
/*
|
|
252
252
|
* Validate JSX maximum depth
|
|
253
253
|
*
|
|
254
254
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
|
|
255
255
|
*/
|
|
256
256
|
"react/jsx-max-depth": [
|
|
257
|
-
"
|
|
257
|
+
"warn",
|
|
258
258
|
{
|
|
259
259
|
max: 10,
|
|
260
260
|
},
|
|
@@ -285,55 +285,55 @@ export const reactPlugin = [
|
|
|
285
285
|
*
|
|
286
286
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
|
|
287
287
|
*/
|
|
288
|
-
"react/jsx-no-bind": "
|
|
288
|
+
"react/jsx-no-bind": "warn",
|
|
289
289
|
/*
|
|
290
290
|
* Prevent comments from being inserted as text nodes
|
|
291
291
|
*
|
|
292
292
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
|
|
293
293
|
*/
|
|
294
|
-
"react/jsx-no-comment-textnodes": "
|
|
294
|
+
"react/jsx-no-comment-textnodes": "warn",
|
|
295
295
|
/*
|
|
296
296
|
* Prevent react contexts from taking non-stable values
|
|
297
297
|
*
|
|
298
298
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
|
|
299
299
|
*/
|
|
300
|
-
"react/jsx-no-constructed-context-values": "
|
|
300
|
+
"react/jsx-no-constructed-context-values": "warn",
|
|
301
301
|
/*
|
|
302
302
|
* Prevent duplicate props in JSX
|
|
303
303
|
*
|
|
304
304
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
|
|
305
305
|
*/
|
|
306
|
-
"react/jsx-no-duplicate-props": "
|
|
306
|
+
"react/jsx-no-duplicate-props": "warn",
|
|
307
307
|
/*
|
|
308
308
|
* Prevent problematic leaked values from being rendered
|
|
309
309
|
*
|
|
310
310
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
|
|
311
311
|
*/
|
|
312
|
-
"react/jsx-no-leaked-render": "
|
|
312
|
+
"react/jsx-no-leaked-render": "warn",
|
|
313
313
|
/*
|
|
314
314
|
* Prevent usage of unwrapped JSX strings
|
|
315
315
|
*
|
|
316
316
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
|
|
317
317
|
*/
|
|
318
|
-
"react/jsx-no-literals": "
|
|
318
|
+
"react/jsx-no-literals": "warn",
|
|
319
319
|
/*
|
|
320
320
|
* Prevent usage of javascript: URLs
|
|
321
321
|
*
|
|
322
322
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
|
|
323
323
|
*/
|
|
324
|
-
"react/jsx-no-script-url": "
|
|
324
|
+
"react/jsx-no-script-url": "warn",
|
|
325
325
|
/*
|
|
326
326
|
* Prevent usage of unsafe target='_blank'
|
|
327
327
|
*
|
|
328
328
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
|
|
329
329
|
*/
|
|
330
|
-
"react/jsx-no-target-blank": "
|
|
330
|
+
"react/jsx-no-target-blank": "warn",
|
|
331
331
|
/*
|
|
332
332
|
* Disallow undeclared variables in JSX
|
|
333
333
|
*
|
|
334
334
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
|
|
335
335
|
*/
|
|
336
|
-
"react/jsx-no-undef": "
|
|
336
|
+
"react/jsx-no-undef": "warn",
|
|
337
337
|
/*
|
|
338
338
|
* Disallow unnescessary fragments (fixable)
|
|
339
339
|
*
|
|
@@ -373,7 +373,7 @@ export const reactPlugin = [
|
|
|
373
373
|
*
|
|
374
374
|
* https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-props-no-spread-multi.md
|
|
375
375
|
*/
|
|
376
|
-
"react/jsx-props-no-spread-multi": "
|
|
376
|
+
"react/jsx-props-no-spread-multi": "warn",
|
|
377
377
|
/*
|
|
378
378
|
* Disallow JSX props spreading
|
|
379
379
|
*
|
|
@@ -409,13 +409,13 @@ export const reactPlugin = [
|
|
|
409
409
|
*
|
|
410
410
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
|
|
411
411
|
*/
|
|
412
|
-
"react/jsx-uses-react": "
|
|
412
|
+
"react/jsx-uses-react": "warn",
|
|
413
413
|
/*
|
|
414
414
|
* Prevent variables used in JSX to be incorrectly marked as unused
|
|
415
415
|
*
|
|
416
416
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
|
|
417
417
|
*/
|
|
418
|
-
"react/jsx-uses-vars": "
|
|
418
|
+
"react/jsx-uses-vars": "warn",
|
|
419
419
|
/*
|
|
420
420
|
* Prevent missing parentheses around multilines JSX (fixable)
|
|
421
421
|
*
|
|
@@ -429,31 +429,31 @@ export const reactPlugin = [
|
|
|
429
429
|
*
|
|
430
430
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md
|
|
431
431
|
*/
|
|
432
|
-
"react/no-access-state-in-setstate": "
|
|
432
|
+
"react/no-access-state-in-setstate": "warn",
|
|
433
433
|
/*
|
|
434
434
|
* Prevent adjacent inline elements not separated by whitespace
|
|
435
435
|
*
|
|
436
436
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
|
|
437
437
|
*/
|
|
438
|
-
"react/no-adjacent-inline-elements": "
|
|
438
|
+
"react/no-adjacent-inline-elements": "warn",
|
|
439
439
|
/*
|
|
440
440
|
* Prevent using Array index in key props
|
|
441
441
|
*
|
|
442
442
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
|
|
443
443
|
*/
|
|
444
|
-
"react/no-array-index-key": "
|
|
444
|
+
"react/no-array-index-key": "warn",
|
|
445
445
|
/*
|
|
446
446
|
* Lifecycle methods should be methods on the prototype, not class fields
|
|
447
447
|
*
|
|
448
448
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-arrow-function-lifecycle.md
|
|
449
449
|
*/
|
|
450
|
-
"react/no-arrow-function-lifecycle": "
|
|
450
|
+
"react/no-arrow-function-lifecycle": "warn",
|
|
451
451
|
/*
|
|
452
452
|
* Prevent passing children as props
|
|
453
453
|
*
|
|
454
454
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
|
|
455
455
|
*/
|
|
456
|
-
"react/no-children-prop": "
|
|
456
|
+
"react/no-children-prop": "warn",
|
|
457
457
|
/*
|
|
458
458
|
* Prevent usage of dangerous JSX properties
|
|
459
459
|
*
|
|
@@ -467,61 +467,61 @@ export const reactPlugin = [
|
|
|
467
467
|
*
|
|
468
468
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
|
|
469
469
|
*/
|
|
470
|
-
"react/no-danger-with-children": "
|
|
470
|
+
"react/no-danger-with-children": "warn",
|
|
471
471
|
/*
|
|
472
472
|
* Prevent usage of deprecated methods, including component lifecyle methods
|
|
473
473
|
*
|
|
474
474
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
|
|
475
475
|
*/
|
|
476
|
-
"react/no-deprecated": "
|
|
476
|
+
"react/no-deprecated": "warn",
|
|
477
477
|
/*
|
|
478
478
|
* Prevent usage of setState in componentDidMount
|
|
479
479
|
*
|
|
480
480
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
|
|
481
481
|
*/
|
|
482
|
-
"react/no-did-mount-set-state": "
|
|
482
|
+
"react/no-did-mount-set-state": "warn",
|
|
483
483
|
/*
|
|
484
484
|
* Prevent usage of setState in componentDidUpdate
|
|
485
485
|
*
|
|
486
486
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
|
|
487
487
|
*/
|
|
488
|
-
"react/no-did-update-set-state": "
|
|
488
|
+
"react/no-did-update-set-state": "warn",
|
|
489
489
|
/*
|
|
490
490
|
* Prevent direct mutation of this.state
|
|
491
491
|
*
|
|
492
492
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
|
|
493
493
|
*/
|
|
494
|
-
"react/no-direct-mutation-state": "
|
|
494
|
+
"react/no-direct-mutation-state": "warn",
|
|
495
495
|
/*
|
|
496
496
|
* Prevent usage of findDOMNode
|
|
497
497
|
*
|
|
498
498
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
|
|
499
499
|
*/
|
|
500
|
-
"react/no-find-dom-node": "
|
|
500
|
+
"react/no-find-dom-node": "warn",
|
|
501
501
|
/*
|
|
502
502
|
* Prevent usage of invalid attributes
|
|
503
503
|
*
|
|
504
504
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-invalid-html-attribute.md
|
|
505
505
|
*/
|
|
506
|
-
"react/no-invalid-html-attribute": "
|
|
506
|
+
"react/no-invalid-html-attribute": "warn",
|
|
507
507
|
/*
|
|
508
508
|
* Prevent usage of isMounted
|
|
509
509
|
*
|
|
510
510
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
|
|
511
511
|
*/
|
|
512
|
-
"react/no-is-mounted": "
|
|
512
|
+
"react/no-is-mounted": "warn",
|
|
513
513
|
/*
|
|
514
514
|
* Prevent multiple component definition per file
|
|
515
515
|
*
|
|
516
516
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
|
|
517
517
|
*/
|
|
518
|
-
"react/no-multi-comp": "
|
|
518
|
+
"react/no-multi-comp": "warn",
|
|
519
519
|
/*
|
|
520
520
|
* Enforce that namespaces are not used in React elements
|
|
521
521
|
*
|
|
522
522
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
|
|
523
523
|
*/
|
|
524
|
-
"react/no-namespace": "
|
|
524
|
+
"react/no-namespace": "warn",
|
|
525
525
|
/*
|
|
526
526
|
* Warns if in a functional component, an object type value (such as
|
|
527
527
|
* array/object literal/function/etc) is used as default prop, to prevent
|
|
@@ -535,13 +535,13 @@ export const reactPlugin = [
|
|
|
535
535
|
*
|
|
536
536
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
|
|
537
537
|
*/
|
|
538
|
-
"react/no-redundant-should-component-update": "
|
|
538
|
+
"react/no-redundant-should-component-update": "warn",
|
|
539
539
|
/*
|
|
540
540
|
* Prevent usage of the return value of React.render
|
|
541
541
|
*
|
|
542
542
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
|
|
543
543
|
*/
|
|
544
|
-
"react/no-render-return-value": "
|
|
544
|
+
"react/no-render-return-value": "warn",
|
|
545
545
|
/*
|
|
546
546
|
* Prevent usage of setState
|
|
547
547
|
*
|
|
@@ -555,79 +555,79 @@ export const reactPlugin = [
|
|
|
555
555
|
*
|
|
556
556
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
|
|
557
557
|
*/
|
|
558
|
-
"react/no-string-refs": "
|
|
558
|
+
"react/no-string-refs": "warn",
|
|
559
559
|
/*
|
|
560
560
|
* Prevent using this in stateless functional components
|
|
561
561
|
*
|
|
562
562
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
|
|
563
563
|
*/
|
|
564
|
-
"react/no-this-in-sfc": "
|
|
564
|
+
"react/no-this-in-sfc": "warn",
|
|
565
565
|
/*
|
|
566
566
|
* Prevent common casing typos
|
|
567
567
|
*
|
|
568
568
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-typos.md
|
|
569
569
|
*/
|
|
570
|
-
"react/no-typos": "
|
|
570
|
+
"react/no-typos": "warn",
|
|
571
571
|
/*
|
|
572
572
|
* Prevent invalid characters from appearing in markup
|
|
573
573
|
*
|
|
574
574
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
|
|
575
575
|
*/
|
|
576
|
-
"react/no-unescaped-entities": "
|
|
576
|
+
"react/no-unescaped-entities": "warn",
|
|
577
577
|
/*
|
|
578
578
|
* Prevent usage of unknown DOM property (fixable)
|
|
579
579
|
*
|
|
580
580
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
|
|
581
581
|
*/
|
|
582
|
-
"react/no-unknown-property": "
|
|
582
|
+
"react/no-unknown-property": "warn",
|
|
583
583
|
/*
|
|
584
584
|
* Prevent usage of unsafe lifecycle methods
|
|
585
585
|
*
|
|
586
586
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
|
|
587
587
|
*/
|
|
588
|
-
"react/no-unsafe": "
|
|
588
|
+
"react/no-unsafe": "warn",
|
|
589
589
|
/*
|
|
590
590
|
* Prevent creating unstable components inside components
|
|
591
591
|
*
|
|
592
592
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
|
|
593
593
|
*/
|
|
594
|
-
"react/no-unstable-nested-components": "
|
|
594
|
+
"react/no-unstable-nested-components": "warn",
|
|
595
595
|
/*
|
|
596
596
|
* Prevent declaring unused methods of component class
|
|
597
597
|
*
|
|
598
598
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md
|
|
599
599
|
*/
|
|
600
|
-
"react/no-unused-class-component-methods": "
|
|
600
|
+
"react/no-unused-class-component-methods": "warn",
|
|
601
601
|
/*
|
|
602
602
|
* Prevent definitions of unused prop types
|
|
603
603
|
*
|
|
604
604
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
|
|
605
605
|
*/
|
|
606
|
-
"react/no-unused-prop-types": "
|
|
606
|
+
"react/no-unused-prop-types": "warn",
|
|
607
607
|
/*
|
|
608
608
|
* Prevent definitions of unused state properties
|
|
609
609
|
*
|
|
610
610
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md
|
|
611
611
|
*/
|
|
612
|
-
"react/no-unused-state": "
|
|
612
|
+
"react/no-unused-state": "warn",
|
|
613
613
|
/*
|
|
614
614
|
* Prevent usage of setState in componentWillUpdate
|
|
615
615
|
*
|
|
616
616
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
|
|
617
617
|
*/
|
|
618
|
-
"react/no-will-update-set-state": "
|
|
618
|
+
"react/no-will-update-set-state": "warn",
|
|
619
619
|
/*
|
|
620
620
|
* Enforce ES5 or ES6 class for React Components
|
|
621
621
|
*
|
|
622
622
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
|
|
623
623
|
*/
|
|
624
|
-
"react/prefer-es6-class": "
|
|
624
|
+
"react/prefer-es6-class": "warn",
|
|
625
625
|
/*
|
|
626
626
|
* Prefer exact proptype definitions
|
|
627
627
|
*
|
|
628
628
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-exact-props.md
|
|
629
629
|
*/
|
|
630
|
-
"react/prefer-exact-props": "
|
|
630
|
+
"react/prefer-exact-props": "warn",
|
|
631
631
|
/*
|
|
632
632
|
* Enforce that props are read-only
|
|
633
633
|
*
|
|
@@ -642,7 +642,7 @@ export const reactPlugin = [
|
|
|
642
642
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
|
|
643
643
|
*/
|
|
644
644
|
"react/prefer-stateless-function": [
|
|
645
|
-
"
|
|
645
|
+
"warn",
|
|
646
646
|
{
|
|
647
647
|
ignorePureComponents: true,
|
|
648
648
|
},
|
|
@@ -674,13 +674,13 @@ export const reactPlugin = [
|
|
|
674
674
|
*
|
|
675
675
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
|
|
676
676
|
*/
|
|
677
|
-
"react/require-optimization": "
|
|
677
|
+
"react/require-optimization": "warn",
|
|
678
678
|
/*
|
|
679
679
|
* Enforce ES5 or ES6 class for returning value in render function
|
|
680
680
|
*
|
|
681
681
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
|
|
682
682
|
*/
|
|
683
|
-
"react/require-render-return": "
|
|
683
|
+
"react/require-render-return": "warn",
|
|
684
684
|
/*
|
|
685
685
|
* Prevent extra closing tags for components without children (fixable)
|
|
686
686
|
*
|
|
@@ -708,31 +708,31 @@ export const reactPlugin = [
|
|
|
708
708
|
*
|
|
709
709
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md
|
|
710
710
|
*/
|
|
711
|
-
"react/sort-prop-types": "
|
|
711
|
+
"react/sort-prop-types": "warn",
|
|
712
712
|
/*
|
|
713
713
|
* This rule will enforce the state initialization style to be either in a constructor or with a class property.
|
|
714
714
|
*
|
|
715
715
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
|
|
716
716
|
*/
|
|
717
|
-
"react/state-in-constructor": "
|
|
717
|
+
"react/state-in-constructor": "warn",
|
|
718
718
|
/*
|
|
719
719
|
* Enforces where React component static properties should be positioned.
|
|
720
720
|
*
|
|
721
721
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
|
|
722
722
|
*/
|
|
723
|
-
"react/static-property-placement": "
|
|
723
|
+
"react/static-property-placement": "warn",
|
|
724
724
|
/*
|
|
725
725
|
* Enforce style prop value being an object
|
|
726
726
|
*
|
|
727
727
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
|
|
728
728
|
*/
|
|
729
|
-
"react/style-prop-object": "
|
|
729
|
+
"react/style-prop-object": "warn",
|
|
730
730
|
/*
|
|
731
731
|
* Prevent void DOM elements (e.g. <img />, <br />) from receiving children
|
|
732
732
|
*
|
|
733
733
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
|
|
734
734
|
*/
|
|
735
|
-
"react/void-dom-elements-no-children": "
|
|
735
|
+
"react/void-dom-elements-no-children": "warn",
|
|
736
736
|
},
|
|
737
737
|
},
|
|
738
738
|
];
|
package/dist/plugins/security.js
CHANGED
|
@@ -13,7 +13,7 @@ export const securityPlugin = [
|
|
|
13
13
|
/*
|
|
14
14
|
* Detects trojan source attacks that employ unicode bidi attacks to inject malicious code.
|
|
15
15
|
*/
|
|
16
|
-
"security/detect-bidi-characters": "
|
|
16
|
+
"security/detect-bidi-characters": "warn",
|
|
17
17
|
/*
|
|
18
18
|
* Detects calls to buffer with noAssert flag set
|
|
19
19
|
*
|
|
@@ -21,13 +21,13 @@ export const securityPlugin = [
|
|
|
21
21
|
* of the offset. This allows the offset to be beyond the end of the Buffer."
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
"security/detect-buffer-noassert": "
|
|
24
|
+
"security/detect-buffer-noassert": "warn",
|
|
25
25
|
/*
|
|
26
26
|
* Detects instances of child_process & non-literal exec()
|
|
27
27
|
*
|
|
28
28
|
* https://blog.liftsecurity.io/2014/08/19/Avoid-Command-Injection-Node.js
|
|
29
29
|
*/
|
|
30
|
-
"security/detect-child-process": "
|
|
30
|
+
"security/detect-child-process": "warn",
|
|
31
31
|
/*
|
|
32
32
|
* Detects object.escapeMarkup = false, which can be used with some
|
|
33
33
|
* template engines to disable escaping of HTML entities. This can lead
|
|
@@ -35,14 +35,14 @@ export const securityPlugin = [
|
|
|
35
35
|
*
|
|
36
36
|
* https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
|
|
37
37
|
*/
|
|
38
|
-
"security/detect-disable-mustache-escape": "
|
|
38
|
+
"security/detect-disable-mustache-escape": "warn",
|
|
39
39
|
/*
|
|
40
40
|
* Detects eval(variable) which can allow an attacker to run arbitary
|
|
41
41
|
* code inside your process.
|
|
42
42
|
*
|
|
43
43
|
* http://security.stackexchange.com/questions/94017/what-are-the-security-issues-with-eval-in-javascript
|
|
44
44
|
*/
|
|
45
|
-
"security/detect-eval-with-expression": "
|
|
45
|
+
"security/detect-eval-with-expression": "warn",
|
|
46
46
|
/*
|
|
47
47
|
* Detects instances of new Buffer(argument) where argument is any non
|
|
48
48
|
* literal value.
|
|
@@ -50,7 +50,7 @@ export const securityPlugin = [
|
|
|
50
50
|
* There wasn't any documentation on https://github.com/nodesecurity/eslint-plugin-security
|
|
51
51
|
* at the time of writing
|
|
52
52
|
*/
|
|
53
|
-
"security/detect-new-buffer": "
|
|
53
|
+
"security/detect-new-buffer": "warn",
|
|
54
54
|
/*
|
|
55
55
|
* Detects Express csrf middleware setup before method-override
|
|
56
56
|
* middleware. This can allow GET requests (which are not checked by csrf)
|
|
@@ -58,28 +58,28 @@ export const securityPlugin = [
|
|
|
58
58
|
*
|
|
59
59
|
* https://blog.liftsecurity.io/2013/09/07/bypass-connect-csrf-protection-by-abusing
|
|
60
60
|
*/
|
|
61
|
-
"security/detect-no-csrf-before-method-override": "
|
|
61
|
+
"security/detect-no-csrf-before-method-override": "warn",
|
|
62
62
|
/*
|
|
63
63
|
* Detects variable in filename argument of fs calls, which might allow
|
|
64
64
|
* an attacker to access anything on your system.
|
|
65
65
|
*
|
|
66
66
|
* https://www.owasp.org/index.php/Path_Traversal
|
|
67
67
|
*/
|
|
68
|
-
"security/detect-non-literal-fs-filename": "
|
|
68
|
+
"security/detect-non-literal-fs-filename": "warn",
|
|
69
69
|
/*
|
|
70
70
|
* Detects RegExp(variable), which might allow an attacker to DOS your
|
|
71
71
|
* server with a long-running regular expression.
|
|
72
72
|
*
|
|
73
73
|
* https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
|
|
74
74
|
*/
|
|
75
|
-
"security/detect-non-literal-regexp": "
|
|
75
|
+
"security/detect-non-literal-regexp": "warn",
|
|
76
76
|
/*
|
|
77
77
|
* Detects require(variable), which might allow an attacker to load and
|
|
78
78
|
* run arbitrary code, or access arbitrary files on disk.
|
|
79
79
|
*
|
|
80
80
|
* http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm
|
|
81
81
|
*/
|
|
82
|
-
"security/detect-non-literal-require": "
|
|
82
|
+
"security/detect-non-literal-require": "warn",
|
|
83
83
|
/*
|
|
84
84
|
* Detects variable[key] as a left- or right-hand assignment operand.
|
|
85
85
|
*
|
|
@@ -94,21 +94,21 @@ export const securityPlugin = [
|
|
|
94
94
|
*
|
|
95
95
|
* https://snyk.io/blog/node-js-timing-attack-ccc-ctf/
|
|
96
96
|
*/
|
|
97
|
-
"security/detect-possible-timing-attacks": "
|
|
97
|
+
"security/detect-possible-timing-attacks": "warn",
|
|
98
98
|
/*
|
|
99
99
|
* Detects if pseudoRandomBytes() is in use, which might not give you
|
|
100
100
|
* the randomness you need and expect.
|
|
101
101
|
*
|
|
102
102
|
* http://stackoverflow.com/questions/18130254/randombytes-vs-pseudorandombytes
|
|
103
103
|
*/
|
|
104
|
-
"security/detect-pseudoRandomBytes": "
|
|
104
|
+
"security/detect-pseudoRandomBytes": "warn",
|
|
105
105
|
/*
|
|
106
106
|
* Locates potentially unsafe regular expressions, which may take a very
|
|
107
107
|
* long time to run, blocking the event loop.
|
|
108
108
|
*
|
|
109
109
|
* https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
|
|
110
110
|
*/
|
|
111
|
-
"security/detect-unsafe-regex": "
|
|
111
|
+
"security/detect-unsafe-regex": "warn",
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/plugins/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/plugins/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EA69B1C,CAAC"}
|