eslint-config-heck 10.2.2 → 11.0.0-beta.2
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/nodeWithBiome.js +106 -154
- package/package.json +6 -8
package/nodeWithBiome.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import reactX from "@eslint-react/eslint-plugin";
|
|
1
2
|
import stylistic from "@stylistic/eslint-plugin";
|
|
2
3
|
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
3
4
|
import tsParser from "@typescript-eslint/parser";
|
|
4
|
-
import importPlugin
|
|
5
|
+
import importPlugin, {
|
|
6
|
+
createNodeResolver,
|
|
7
|
+
flatConfigs,
|
|
8
|
+
} from "eslint-plugin-import-x";
|
|
5
9
|
import jest from "eslint-plugin-jest";
|
|
6
|
-
import react from "eslint-plugin-react";
|
|
7
10
|
import testingLibrary from "eslint-plugin-testing-library";
|
|
8
11
|
import unicorn from "eslint-plugin-unicorn";
|
|
9
12
|
import globals from "globals";
|
|
@@ -12,8 +15,8 @@ import globals from "globals";
|
|
|
12
15
|
export default [
|
|
13
16
|
{
|
|
14
17
|
plugins: {
|
|
18
|
+
react: reactX,
|
|
15
19
|
"@stylistic": stylistic,
|
|
16
|
-
react,
|
|
17
20
|
unicorn,
|
|
18
21
|
importPlugin,
|
|
19
22
|
},
|
|
@@ -35,8 +38,10 @@ export default [
|
|
|
35
38
|
},
|
|
36
39
|
},
|
|
37
40
|
settings: {
|
|
38
|
-
react: {
|
|
41
|
+
"react-x": {
|
|
39
42
|
version: "detect",
|
|
43
|
+
importSource: "react",
|
|
44
|
+
polymorphicPropName: "as",
|
|
40
45
|
},
|
|
41
46
|
},
|
|
42
47
|
rules: {
|
|
@@ -290,7 +295,9 @@ export default [
|
|
|
290
295
|
"unicode-bom": "error",
|
|
291
296
|
|
|
292
297
|
// @stylistic
|
|
293
|
-
"@stylistic/jsx-
|
|
298
|
+
"@stylistic/jsx-child-element-spacing": "error",
|
|
299
|
+
"@stylistic/jsx-curly-brace-presence": ["error", "always"],
|
|
300
|
+
"@stylistic/jsx-pascal-case": "error",
|
|
294
301
|
"@stylistic/max-statements-per-line": "off",
|
|
295
302
|
"@stylistic/multiline-comment-style": ["error", "separate-lines"],
|
|
296
303
|
"@stylistic/no-floating-decimal": "off",
|
|
@@ -351,158 +358,99 @@ export default [
|
|
|
351
358
|
"@stylistic/quote-props": "off",
|
|
352
359
|
"@stylistic/spaced-comment": ["error", "always"],
|
|
353
360
|
|
|
354
|
-
// eslint-plugin
|
|
355
|
-
|
|
356
|
-
"react/
|
|
357
|
-
"react/
|
|
358
|
-
"react/
|
|
359
|
-
"react/
|
|
360
|
-
"error",
|
|
361
|
-
"always",
|
|
362
|
-
{
|
|
363
|
-
destructureInSignature: "always",
|
|
364
|
-
},
|
|
365
|
-
],
|
|
366
|
-
"react/display-name": "off",
|
|
367
|
-
"react/forbid-component-props": "off",
|
|
368
|
-
"react/forbid-dom-props": "off",
|
|
369
|
-
"react/forbid-elements": "off",
|
|
370
|
-
"react/forbid-foreign-prop-types": "off",
|
|
371
|
-
"react/forbid-prop-types": "off",
|
|
372
|
-
"react/forward-ref-uses-ref": "error",
|
|
373
|
-
"react/function-component-definition": [
|
|
374
|
-
"error",
|
|
375
|
-
{
|
|
376
|
-
namedComponents: "function-declaration",
|
|
377
|
-
unnamedComponents: "arrow-function",
|
|
378
|
-
},
|
|
379
|
-
],
|
|
380
|
-
"react/hook-use-state": [
|
|
381
|
-
"error",
|
|
382
|
-
{
|
|
383
|
-
allowDestructuredState: true,
|
|
384
|
-
},
|
|
385
|
-
],
|
|
386
|
-
"react/iframe-missing-sandbox": "off",
|
|
387
|
-
"react/jsx-boolean-value": "off",
|
|
388
|
-
"react/jsx-child-element-spacing": "error",
|
|
389
|
-
"react/jsx-closing-bracket-location": "off",
|
|
390
|
-
"react/jsx-closing-tag-location": "off",
|
|
391
|
-
"react/jsx-curly-brace-presence": ["error", "always"],
|
|
392
|
-
"react/jsx-curly-spacing": "off",
|
|
393
|
-
"react/jsx-equals-spacing": "off",
|
|
394
|
-
"react/jsx-filename-extension": [
|
|
395
|
-
"error",
|
|
396
|
-
{
|
|
397
|
-
extensions: [".jsx", ".tsx"],
|
|
398
|
-
},
|
|
399
|
-
],
|
|
400
|
-
"react/jsx-first-prop-new-line": "off",
|
|
401
|
-
"react/jsx-fragments": "off",
|
|
402
|
-
"react/jsx-handler-names": "error",
|
|
403
|
-
"react/jsx-key": "off",
|
|
404
|
-
"react/jsx-max-depth": "off",
|
|
405
|
-
"react/jsx-newline": "off",
|
|
406
|
-
"react/jsx-no-bind": [
|
|
407
|
-
"error",
|
|
408
|
-
{
|
|
409
|
-
allowArrowFunctions: true,
|
|
410
|
-
},
|
|
411
|
-
],
|
|
412
|
-
"react/jsx-no-comment-textnodes": "off",
|
|
413
|
-
"react/jsx-no-constructed-context-values": "error",
|
|
414
|
-
"react/jsx-no-duplicate-props": "off",
|
|
415
|
-
"react/jsx-no-leaked-render": "off",
|
|
416
|
-
"react/jsx-no-literals": "off",
|
|
417
|
-
"react/jsx-no-script-url": "off",
|
|
418
|
-
"react/jsx-no-target-blank": "off",
|
|
419
|
-
"react/jsx-no-undef": [
|
|
420
|
-
"error",
|
|
421
|
-
{
|
|
422
|
-
allowGlobals: false,
|
|
423
|
-
},
|
|
424
|
-
],
|
|
425
|
-
"react/jsx-no-useless-fragment": "off",
|
|
426
|
-
"react/jsx-pascal-case": "error",
|
|
427
|
-
"react/jsx-props-no-spread-multi": "off",
|
|
428
|
-
"react/jsx-props-no-spreading": "off",
|
|
429
|
-
"react/jsx-sort-props": "off",
|
|
430
|
-
"react/jsx-tag-spacing": "off",
|
|
431
|
-
"react/jsx-uses-react": "off",
|
|
432
|
-
"react/jsx-uses-vars": "error",
|
|
433
|
-
"react/jsx-wrap-multilines": "off",
|
|
361
|
+
// @eslint-react/eslint-plugin
|
|
362
|
+
// X Rules
|
|
363
|
+
"react/error-boundaries": "error",
|
|
364
|
+
"react/exhaustive-deps": "off",
|
|
365
|
+
"react/globals": "error",
|
|
366
|
+
"react/immutability": "error",
|
|
434
367
|
"react/no-access-state-in-setstate": "error",
|
|
435
|
-
"react/no-adjacent-inline-elements": "error",
|
|
436
368
|
"react/no-array-index-key": "off",
|
|
437
|
-
"react/no-
|
|
438
|
-
"react/no-children-
|
|
439
|
-
"react/no-
|
|
440
|
-
"react/no-
|
|
441
|
-
"react/no-
|
|
442
|
-
"react/no-
|
|
443
|
-
"react/no-
|
|
369
|
+
"react/no-children-count": "error",
|
|
370
|
+
"react/no-children-for-each": "error",
|
|
371
|
+
"react/no-children-map": "error",
|
|
372
|
+
"react/no-children-only": "error",
|
|
373
|
+
"react/no-children-to-array": "error",
|
|
374
|
+
"react/no-class-component": "warn",
|
|
375
|
+
"react/no-clone-element": "error",
|
|
376
|
+
"react/no-component-will-mount": "warn",
|
|
377
|
+
"react/no-component-will-receive-props": "warn",
|
|
378
|
+
"react/no-component-will-update": "warn",
|
|
379
|
+
"react/no-context-provider": "warn",
|
|
380
|
+
"react/no-create-ref": "warn",
|
|
444
381
|
"react/no-direct-mutation-state": "error",
|
|
445
|
-
"react/no-
|
|
446
|
-
"react/no-
|
|
447
|
-
"react/no-
|
|
448
|
-
"react/no-
|
|
449
|
-
"react/no-
|
|
450
|
-
"react/no-
|
|
451
|
-
"react/no-
|
|
452
|
-
"react/no-
|
|
453
|
-
"react/no-
|
|
454
|
-
"react/no-
|
|
455
|
-
"react/no-
|
|
456
|
-
"react/no-
|
|
457
|
-
"react/no-
|
|
458
|
-
"react/no-
|
|
459
|
-
"react/no-
|
|
460
|
-
"react/no-
|
|
461
|
-
"react/no-
|
|
462
|
-
"react/no-
|
|
382
|
+
"react/no-duplicate-key": "error",
|
|
383
|
+
"react/no-forward-ref": "warn",
|
|
384
|
+
"react/no-implicit-children": "error",
|
|
385
|
+
"react/no-implicit-key": "error",
|
|
386
|
+
"react/no-implicit-ref": "error",
|
|
387
|
+
"react/no-leaked-conditional-rendering": "off",
|
|
388
|
+
"react/no-missing-component-display-name": "warn",
|
|
389
|
+
"react/no-missing-context-display-name": "warn",
|
|
390
|
+
"react/no-missing-key": "off",
|
|
391
|
+
"react/no-misused-capture-owner-stack": "error",
|
|
392
|
+
"react/no-nested-component-definitions": "error",
|
|
393
|
+
"react/no-nested-lazy-component-declarations": "error",
|
|
394
|
+
"react/no-set-state-in-component-did-mount": "error",
|
|
395
|
+
"react/no-set-state-in-component-did-update": "error",
|
|
396
|
+
"react/no-set-state-in-component-will-update": "error",
|
|
397
|
+
"react/no-unnecessary-use-prefix": "warn",
|
|
398
|
+
"react/no-unsafe-component-will-mount": "error",
|
|
399
|
+
"react/no-unsafe-component-will-receive-props": "error",
|
|
400
|
+
"react/no-unsafe-component-will-update": "error",
|
|
401
|
+
"react/no-unstable-context-value": "error",
|
|
402
|
+
"react/no-unstable-default-props": "error",
|
|
403
|
+
"react/no-unused-class-component-members": "error",
|
|
404
|
+
"react/no-unused-props": "error",
|
|
463
405
|
"react/no-unused-state": "error",
|
|
464
|
-
"react/no-
|
|
465
|
-
"react/
|
|
466
|
-
"react/
|
|
467
|
-
"react/
|
|
468
|
-
"react/
|
|
469
|
-
"react/
|
|
470
|
-
"react/
|
|
471
|
-
"react/
|
|
472
|
-
"react/
|
|
473
|
-
"react/
|
|
474
|
-
|
|
475
|
-
"react/
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
"react/
|
|
492
|
-
"react/
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
"react/
|
|
504
|
-
"react/
|
|
505
|
-
"react/
|
|
406
|
+
"react/no-use-context": "warn",
|
|
407
|
+
"react/purity": "error",
|
|
408
|
+
"react/refs": "error",
|
|
409
|
+
"react/rules-of-hooks": "error",
|
|
410
|
+
"react/set-state-in-effect": "error",
|
|
411
|
+
"react/set-state-in-render": "error",
|
|
412
|
+
"react/static-components": "error",
|
|
413
|
+
"react/unsupported-syntax": "error",
|
|
414
|
+
"react/use-memo": "error",
|
|
415
|
+
"react/use-state": "error",
|
|
416
|
+
// JSX Rules
|
|
417
|
+
"react/jsx-no-children-prop": "error",
|
|
418
|
+
"react/jsx-no-children-prop-with-children": "error",
|
|
419
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
420
|
+
"react/jsx-no-key-after-spread": "error",
|
|
421
|
+
"react/jsx-no-leaked-dollar": "off",
|
|
422
|
+
"react/jsx-no-leaked-semicolon": "error",
|
|
423
|
+
"react/jsx-no-namespace": "off",
|
|
424
|
+
"react/jsx-no-useless-fragment": "off",
|
|
425
|
+
// RSC Rules
|
|
426
|
+
"react/rsc-function-definition": "error",
|
|
427
|
+
// DOM Rules
|
|
428
|
+
"react/dom-no-dangerously-set-innerhtml": "off",
|
|
429
|
+
"react/dom-no-dangerously-set-innerhtml-with-children": "off",
|
|
430
|
+
"react/dom-no-find-dom-node": "error",
|
|
431
|
+
"react/dom-no-flush-sync": "error",
|
|
432
|
+
"react/dom-no-hydrate": "warn",
|
|
433
|
+
"react/dom-no-missing-button-type": "off",
|
|
434
|
+
"react/dom-no-missing-iframe-sandbox": "off",
|
|
435
|
+
"react/dom-no-render": "warn",
|
|
436
|
+
"react/dom-no-render-return-value": "error",
|
|
437
|
+
"react/dom-no-script-url": "error",
|
|
438
|
+
"react/dom-no-string-style-prop": "error",
|
|
439
|
+
"react/dom-no-unknown-property": "off",
|
|
440
|
+
"react/dom-no-unsafe-iframe-sandbox": "off",
|
|
441
|
+
"react/dom-no-unsafe-target-blank": "off",
|
|
442
|
+
"react/dom-no-use-form-state": "warn",
|
|
443
|
+
"react/dom-no-void-elements-with-children": "off",
|
|
444
|
+
// Web API Rules
|
|
445
|
+
"react/web-api-no-leaked-event-listener": "error",
|
|
446
|
+
"react/web-api-no-leaked-fetch": "error",
|
|
447
|
+
"react/web-api-no-leaked-interval": "error",
|
|
448
|
+
"react/web-api-no-leaked-resize-observer": "error",
|
|
449
|
+
"react/web-api-no-leaked-timeout": "error",
|
|
450
|
+
// Naming Convention Rules
|
|
451
|
+
"react/naming-convention-context-name": "warn",
|
|
452
|
+
"react/naming-convention-id-name": "warn",
|
|
453
|
+
"react/naming-convention-ref-name": "warn",
|
|
506
454
|
|
|
507
455
|
// eslint-plugin-unicorn
|
|
508
456
|
"unicorn/better-regex": "error",
|
|
@@ -645,7 +593,6 @@ export default [
|
|
|
645
593
|
"unicorn/prefer-string-trim-start-end": "off",
|
|
646
594
|
"unicorn/prefer-structured-clone": "error",
|
|
647
595
|
"unicorn/prefer-switch": "error",
|
|
648
|
-
|
|
649
596
|
// TODO: off until there is a solution to this: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1079
|
|
650
597
|
"unicorn/prefer-ternary": "off",
|
|
651
598
|
"unicorn/prefer-top-level-await": "off",
|
|
@@ -720,6 +667,11 @@ export default [
|
|
|
720
667
|
},
|
|
721
668
|
{
|
|
722
669
|
files: ["**/*.ts", "**/*.tsx"],
|
|
670
|
+
...flatConfigs.typescript,
|
|
671
|
+
settings: {
|
|
672
|
+
...flatConfigs.typescript.settings,
|
|
673
|
+
"import-x/resolver-next": [createNodeResolver()],
|
|
674
|
+
},
|
|
723
675
|
},
|
|
724
676
|
{
|
|
725
677
|
files: ["**/*.ts", "**/*.tsx"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0-beta.2",
|
|
4
4
|
"description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -28,14 +28,12 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "8.59.
|
|
32
|
-
"@typescript-eslint/parser": "8.59.
|
|
33
|
-
"eslint": "
|
|
34
|
-
"eslint
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "8.59.3",
|
|
32
|
+
"@typescript-eslint/parser": "8.59.3",
|
|
33
|
+
"@eslint-react/eslint-plugin": "5.8.3",
|
|
34
|
+
"eslint": "10.4.0",
|
|
35
35
|
"eslint-plugin-import-x": "4.16.2",
|
|
36
36
|
"eslint-plugin-jest": "29.15.2",
|
|
37
|
-
"eslint-plugin-react": "7.37.5",
|
|
38
|
-
"eslint-plugin-react-hooks": "7.1.1",
|
|
39
37
|
"eslint-plugin-testing-library": "7.16.2",
|
|
40
38
|
"eslint-plugin-unicorn": "64.0.0",
|
|
41
39
|
"typescript": "6.0.3"
|
|
@@ -45,7 +43,7 @@
|
|
|
45
43
|
"@testing-library/dom": "10.4.1",
|
|
46
44
|
"@testing-library/react": "16.3.2",
|
|
47
45
|
"@types/jest": "30.0.0",
|
|
48
|
-
"@types/react": "19.2.
|
|
46
|
+
"@types/react": "19.2.14",
|
|
49
47
|
"globals": "17.6.0",
|
|
50
48
|
"jest": "30.4.2",
|
|
51
49
|
"react": "19.2.6",
|