@eslint-react/eslint-plugin 1.24.0-next.9 → 1.24.1-beta.1
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 +7 -7
- package/dist/index.d.mts +114 -122
- package/dist/index.d.ts +114 -122
- package/dist/index.js +27 -37
- package/dist/index.mjs +27 -37
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ A set of composable ESLint rules for libraries and frameworks that use React as
|
|
|
12
12
|
- **Comprehensive**: First-class support for TypeScript, React 19, polymorphic components.
|
|
13
13
|
- **Advanced Analysis**: Handles complex scenarios and identifies problems that other tools might miss.
|
|
14
14
|
|
|
15
|
-
## Public
|
|
15
|
+
## Public Packages
|
|
16
16
|
|
|
17
|
-
### All-
|
|
17
|
+
### All-In-One Plugin
|
|
18
18
|
|
|
19
19
|
- [`@eslint-react/eslint-plugin`](https://www.npmjs.com/package/@eslint-react/eslint-plugin) - The main ESLint plugin package including all rules and config presets in this repository.
|
|
20
20
|
|
|
21
|
-
### Modular
|
|
21
|
+
### Modular Plugins
|
|
22
22
|
|
|
23
23
|
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - Core rules (renderer-agnostic, compatible with x-platform).
|
|
24
24
|
- [`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - DOM specific rules for React DOM.
|
|
@@ -93,7 +93,7 @@ export default tseslint.config({
|
|
|
93
93
|
- **Recommended Type-Checked** (`recommended-type-checked`)\
|
|
94
94
|
Same as the `recommended-typescript` preset but enables additional rules that require type information.
|
|
95
95
|
|
|
96
|
-
[Full Presets List↗](https://eslint-react.xyz/docs/presets)
|
|
96
|
+
[Full Presets List ↗](https://eslint-react.xyz/docs/presets)
|
|
97
97
|
|
|
98
98
|
## Rules
|
|
99
99
|
|
|
@@ -107,11 +107,11 @@ export default tseslint.config({
|
|
|
107
107
|
|
|
108
108
|
- [Milestone 2.0 ↗](https://eslint-react.xyz/roadmap#milestone-20)
|
|
109
109
|
|
|
110
|
-
##
|
|
110
|
+
## Notable Projects Using ESLint React
|
|
111
111
|
|
|
112
|
-

|
|
112
|
+
[](https://github.com/Rel1cx/eslint-react/blob/main/assets/NOTABLE_PROJECTS_USING_ESLINT_REACT)
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
## Community ESLint Configs Adopting ESLint React
|
|
115
115
|
|
|
116
116
|
- [`antfu/eslint-config`](https://github.com/antfu/eslint-config) - Anthony's ESLint config preset.
|
|
117
117
|
- [`eslint-config-rebeccastevens`](https://github.com/RebeccaStevens/eslint-config-rebeccastevens) - Rebecca's ESLint config preset.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
import { RulePreset } from '@eslint-react/shared';
|
|
2
3
|
|
|
3
4
|
declare const name$b = "@eslint-react/all";
|
|
4
5
|
declare const rules$b: {
|
|
@@ -231,12 +232,27 @@ declare const plugins$6: {
|
|
|
231
232
|
};
|
|
232
233
|
declare const settings$5: {
|
|
233
234
|
"react-x": {
|
|
234
|
-
readonly
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
readonly importSource: "react";
|
|
236
|
+
readonly jsxPragma: "createElement";
|
|
237
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
237
238
|
readonly polymorphicPropName: "as";
|
|
239
|
+
readonly strict: false;
|
|
238
240
|
readonly strictImportCheck: false;
|
|
239
241
|
readonly version: "detect";
|
|
242
|
+
readonly additionalHooks: {
|
|
243
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
244
|
+
};
|
|
245
|
+
readonly additionalComponents?: {
|
|
246
|
+
name: string;
|
|
247
|
+
as?: string;
|
|
248
|
+
attributes?: {
|
|
249
|
+
name: string;
|
|
250
|
+
as?: string;
|
|
251
|
+
controlled?: boolean;
|
|
252
|
+
defaultValue?: string;
|
|
253
|
+
}[];
|
|
254
|
+
selector?: string;
|
|
255
|
+
}[];
|
|
240
256
|
};
|
|
241
257
|
};
|
|
242
258
|
|
|
@@ -351,12 +367,27 @@ declare const plugins$5: {
|
|
|
351
367
|
};
|
|
352
368
|
declare const settings$4: {
|
|
353
369
|
"react-x": {
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
|
|
370
|
+
readonly importSource: "react";
|
|
371
|
+
readonly jsxPragma: "createElement";
|
|
372
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
357
373
|
readonly polymorphicPropName: "as";
|
|
374
|
+
readonly strict: false;
|
|
358
375
|
readonly strictImportCheck: false;
|
|
359
376
|
readonly version: "detect";
|
|
377
|
+
readonly additionalHooks: {
|
|
378
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
379
|
+
};
|
|
380
|
+
readonly additionalComponents?: {
|
|
381
|
+
name: string;
|
|
382
|
+
as?: string;
|
|
383
|
+
attributes?: {
|
|
384
|
+
name: string;
|
|
385
|
+
as?: string;
|
|
386
|
+
controlled?: boolean;
|
|
387
|
+
defaultValue?: string;
|
|
388
|
+
}[];
|
|
389
|
+
selector?: string;
|
|
390
|
+
}[];
|
|
360
391
|
};
|
|
361
392
|
};
|
|
362
393
|
|
|
@@ -392,53 +423,28 @@ declare namespace debugConfig {
|
|
|
392
423
|
}
|
|
393
424
|
|
|
394
425
|
declare const name$8 = "@eslint-react/disable-debug";
|
|
395
|
-
declare const rules$8:
|
|
396
|
-
"@eslint-react/debug/class-component"?: "off";
|
|
397
|
-
"@eslint-react/debug/function-component"?: "off";
|
|
398
|
-
"@eslint-react/debug/hook"?: "off";
|
|
399
|
-
"@eslint-react/debug/is-from-react"?: "off";
|
|
400
|
-
};
|
|
426
|
+
declare const rules$8: RulePreset;
|
|
401
427
|
|
|
402
428
|
declare namespace disableDebugConfig {
|
|
403
429
|
export { name$8 as name, rules$8 as rules };
|
|
404
430
|
}
|
|
405
431
|
|
|
406
432
|
declare const name$7 = "@eslint-react/disable-dom";
|
|
407
|
-
declare const rules$7:
|
|
408
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml"?: "off";
|
|
409
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children"?: "off";
|
|
410
|
-
"@eslint-react/dom/no-find-dom-node"?: "off";
|
|
411
|
-
"@eslint-react/dom/no-missing-button-type"?: "off";
|
|
412
|
-
"@eslint-react/dom/no-missing-iframe-sandbox"?: "off";
|
|
413
|
-
"@eslint-react/dom/no-namespace"?: "off";
|
|
414
|
-
"@eslint-react/dom/no-render-return-value"?: "off";
|
|
415
|
-
"@eslint-react/dom/no-script-url"?: "off";
|
|
416
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox"?: "off";
|
|
417
|
-
"@eslint-react/dom/no-unsafe-target-blank"?: "off";
|
|
418
|
-
"@eslint-react/dom/no-void-elements-with-children"?: "off";
|
|
419
|
-
};
|
|
433
|
+
declare const rules$7: RulePreset;
|
|
420
434
|
|
|
421
435
|
declare namespace disableDomConfig {
|
|
422
436
|
export { name$7 as name, rules$7 as rules };
|
|
423
437
|
}
|
|
424
438
|
|
|
425
439
|
declare const name$6 = "@eslint-react/disable-type-checked";
|
|
426
|
-
declare const rules$6:
|
|
427
|
-
readonly "@eslint-react/no-leaked-conditional-rendering": "off";
|
|
428
|
-
readonly "@eslint-react/prefer-read-only-props": "off";
|
|
429
|
-
};
|
|
440
|
+
declare const rules$6: RulePreset;
|
|
430
441
|
|
|
431
442
|
declare namespace disableTypeCheckedConfig {
|
|
432
443
|
export { name$6 as name, rules$6 as rules };
|
|
433
444
|
}
|
|
434
445
|
|
|
435
446
|
declare const name$5 = "@eslint-react/disable-web-api";
|
|
436
|
-
declare const rules$5:
|
|
437
|
-
"@eslint-react/web-api/no-leaked-event-listener"?: "off";
|
|
438
|
-
"@eslint-react/web-api/no-leaked-interval"?: "off";
|
|
439
|
-
"@eslint-react/web-api/no-leaked-resize-observer"?: "off";
|
|
440
|
-
"@eslint-react/web-api/no-leaked-timeout"?: "off";
|
|
441
|
-
};
|
|
447
|
+
declare const rules$5: RulePreset;
|
|
442
448
|
|
|
443
449
|
declare namespace disableWebApiConfig {
|
|
444
450
|
export { name$5 as name, rules$5 as rules };
|
|
@@ -483,12 +489,27 @@ declare const plugins$3: {
|
|
|
483
489
|
};
|
|
484
490
|
declare const settings$3: {
|
|
485
491
|
"react-x": {
|
|
486
|
-
readonly
|
|
487
|
-
|
|
488
|
-
|
|
492
|
+
readonly importSource: "react";
|
|
493
|
+
readonly jsxPragma: "createElement";
|
|
494
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
489
495
|
readonly polymorphicPropName: "as";
|
|
496
|
+
readonly strict: false;
|
|
490
497
|
readonly strictImportCheck: false;
|
|
491
498
|
readonly version: "detect";
|
|
499
|
+
readonly additionalHooks: {
|
|
500
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
501
|
+
};
|
|
502
|
+
readonly additionalComponents?: {
|
|
503
|
+
name: string;
|
|
504
|
+
as?: string;
|
|
505
|
+
attributes?: {
|
|
506
|
+
name: string;
|
|
507
|
+
as?: string;
|
|
508
|
+
controlled?: boolean;
|
|
509
|
+
defaultValue?: string;
|
|
510
|
+
}[];
|
|
511
|
+
selector?: string;
|
|
512
|
+
}[];
|
|
492
513
|
};
|
|
493
514
|
};
|
|
494
515
|
|
|
@@ -497,81 +518,7 @@ declare namespace domConfig {
|
|
|
497
518
|
}
|
|
498
519
|
|
|
499
520
|
declare const name$3 = "@eslint-react/off";
|
|
500
|
-
declare const rules$3:
|
|
501
|
-
"@eslint-react/no-leaked-conditional-rendering": "off";
|
|
502
|
-
"@eslint-react/prefer-read-only-props": "off";
|
|
503
|
-
"@eslint-react/ensure-forward-ref-using-ref"?: "off";
|
|
504
|
-
"@eslint-react/no-access-state-in-setstate"?: "off";
|
|
505
|
-
"@eslint-react/no-array-index-key"?: "off";
|
|
506
|
-
"@eslint-react/no-children-count"?: "off";
|
|
507
|
-
"@eslint-react/no-children-for-each"?: "off";
|
|
508
|
-
"@eslint-react/no-children-map"?: "off";
|
|
509
|
-
"@eslint-react/no-children-only"?: "off";
|
|
510
|
-
"@eslint-react/no-children-prop"?: "off";
|
|
511
|
-
"@eslint-react/no-children-to-array"?: "off";
|
|
512
|
-
"@eslint-react/no-class-component"?: "off";
|
|
513
|
-
"@eslint-react/no-clone-element"?: "off";
|
|
514
|
-
"@eslint-react/no-comment-textnodes"?: "off";
|
|
515
|
-
"@eslint-react/no-complex-conditional-rendering"?: "off";
|
|
516
|
-
"@eslint-react/no-component-will-mount"?: "off";
|
|
517
|
-
"@eslint-react/no-component-will-receive-props"?: "off";
|
|
518
|
-
"@eslint-react/no-component-will-update"?: "off";
|
|
519
|
-
"@eslint-react/no-context-provider"?: "off";
|
|
520
|
-
"@eslint-react/no-create-ref"?: "off";
|
|
521
|
-
"@eslint-react/no-default-props"?: "off";
|
|
522
|
-
"@eslint-react/no-direct-mutation-state"?: "off";
|
|
523
|
-
"@eslint-react/no-duplicate-jsx-props"?: "off";
|
|
524
|
-
"@eslint-react/no-duplicate-key"?: "off";
|
|
525
|
-
"@eslint-react/no-forward-ref"?: "off";
|
|
526
|
-
"@eslint-react/no-implicit-key"?: "off";
|
|
527
|
-
"@eslint-react/no-missing-component-display-name"?: "off";
|
|
528
|
-
"@eslint-react/no-missing-key"?: "off";
|
|
529
|
-
"@eslint-react/no-nested-components"?: "off";
|
|
530
|
-
"@eslint-react/no-prop-types"?: "off";
|
|
531
|
-
"@eslint-react/no-redundant-should-component-update"?: "off";
|
|
532
|
-
"@eslint-react/no-set-state-in-component-did-mount"?: "off";
|
|
533
|
-
"@eslint-react/no-set-state-in-component-did-update"?: "off";
|
|
534
|
-
"@eslint-react/no-set-state-in-component-will-update"?: "off";
|
|
535
|
-
"@eslint-react/no-string-refs"?: "off";
|
|
536
|
-
"@eslint-react/no-unsafe-component-will-mount"?: "off";
|
|
537
|
-
"@eslint-react/no-unsafe-component-will-receive-props"?: "off";
|
|
538
|
-
"@eslint-react/no-unsafe-component-will-update"?: "off";
|
|
539
|
-
"@eslint-react/no-unstable-context-value"?: "off";
|
|
540
|
-
"@eslint-react/no-unstable-default-props"?: "off";
|
|
541
|
-
"@eslint-react/no-unused-class-component-members"?: "off";
|
|
542
|
-
"@eslint-react/no-unused-state"?: "off";
|
|
543
|
-
"@eslint-react/no-useless-fragment"?: "off";
|
|
544
|
-
"@eslint-react/prefer-destructuring-assignment"?: "off";
|
|
545
|
-
"@eslint-react/prefer-shorthand-boolean"?: "off";
|
|
546
|
-
"@eslint-react/prefer-shorthand-fragment"?: "off";
|
|
547
|
-
"@eslint-react/use-jsx-vars"?: "off";
|
|
548
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml"?: "off";
|
|
549
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children"?: "off";
|
|
550
|
-
"@eslint-react/dom/no-find-dom-node"?: "off";
|
|
551
|
-
"@eslint-react/dom/no-missing-button-type"?: "off";
|
|
552
|
-
"@eslint-react/dom/no-missing-iframe-sandbox"?: "off";
|
|
553
|
-
"@eslint-react/dom/no-namespace"?: "off";
|
|
554
|
-
"@eslint-react/dom/no-render-return-value"?: "off";
|
|
555
|
-
"@eslint-react/dom/no-script-url"?: "off";
|
|
556
|
-
"@eslint-react/dom/no-unknown-property"?: "off";
|
|
557
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox"?: "off";
|
|
558
|
-
"@eslint-react/dom/no-unsafe-target-blank"?: "off";
|
|
559
|
-
"@eslint-react/dom/no-void-elements-with-children"?: "off";
|
|
560
|
-
"@eslint-react/web-api/no-leaked-event-listener"?: "off";
|
|
561
|
-
"@eslint-react/web-api/no-leaked-interval"?: "off";
|
|
562
|
-
"@eslint-react/web-api/no-leaked-resize-observer"?: "off";
|
|
563
|
-
"@eslint-react/web-api/no-leaked-timeout"?: "off";
|
|
564
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect"?: "off";
|
|
565
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect"?: "off";
|
|
566
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-callback"?: "off";
|
|
567
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-memo"?: "off";
|
|
568
|
-
"@eslint-react/hooks-extra/no-useless-custom-hooks"?: "off";
|
|
569
|
-
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization"?: "off";
|
|
570
|
-
"@eslint-react/naming-convention/component-name"?: "off";
|
|
571
|
-
"@eslint-react/naming-convention/filename"?: "off";
|
|
572
|
-
"@eslint-react/naming-convention/filename-extension"?: "off";
|
|
573
|
-
"@eslint-react/naming-convention/use-state"?: "off";
|
|
574
|
-
};
|
|
521
|
+
declare const rules$3: RulePreset;
|
|
575
522
|
|
|
576
523
|
declare namespace offConfig {
|
|
577
524
|
export { name$3 as name, rules$3 as rules };
|
|
@@ -792,12 +739,27 @@ declare const plugins$2: {
|
|
|
792
739
|
};
|
|
793
740
|
declare const settings$2: {
|
|
794
741
|
"react-x": {
|
|
795
|
-
readonly
|
|
796
|
-
|
|
797
|
-
|
|
742
|
+
readonly importSource: "react";
|
|
743
|
+
readonly jsxPragma: "createElement";
|
|
744
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
798
745
|
readonly polymorphicPropName: "as";
|
|
746
|
+
readonly strict: false;
|
|
799
747
|
readonly strictImportCheck: false;
|
|
800
748
|
readonly version: "detect";
|
|
749
|
+
readonly additionalHooks: {
|
|
750
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
751
|
+
};
|
|
752
|
+
readonly additionalComponents?: {
|
|
753
|
+
name: string;
|
|
754
|
+
as?: string;
|
|
755
|
+
attributes?: {
|
|
756
|
+
name: string;
|
|
757
|
+
as?: string;
|
|
758
|
+
controlled?: boolean;
|
|
759
|
+
defaultValue?: string;
|
|
760
|
+
}[];
|
|
761
|
+
selector?: string;
|
|
762
|
+
}[];
|
|
801
763
|
};
|
|
802
764
|
};
|
|
803
765
|
|
|
@@ -1022,12 +984,27 @@ declare const plugins$1: {
|
|
|
1022
984
|
};
|
|
1023
985
|
declare const settings$1: {
|
|
1024
986
|
"react-x": {
|
|
1025
|
-
readonly
|
|
1026
|
-
|
|
1027
|
-
|
|
987
|
+
readonly importSource: "react";
|
|
988
|
+
readonly jsxPragma: "createElement";
|
|
989
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1028
990
|
readonly polymorphicPropName: "as";
|
|
991
|
+
readonly strict: false;
|
|
1029
992
|
readonly strictImportCheck: false;
|
|
1030
993
|
readonly version: "detect";
|
|
994
|
+
readonly additionalHooks: {
|
|
995
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
996
|
+
};
|
|
997
|
+
readonly additionalComponents?: {
|
|
998
|
+
name: string;
|
|
999
|
+
as?: string;
|
|
1000
|
+
attributes?: {
|
|
1001
|
+
name: string;
|
|
1002
|
+
as?: string;
|
|
1003
|
+
controlled?: boolean;
|
|
1004
|
+
defaultValue?: string;
|
|
1005
|
+
}[];
|
|
1006
|
+
selector?: string;
|
|
1007
|
+
}[];
|
|
1031
1008
|
};
|
|
1032
1009
|
};
|
|
1033
1010
|
|
|
@@ -1251,12 +1228,27 @@ declare const plugins: {
|
|
|
1251
1228
|
};
|
|
1252
1229
|
declare const settings: {
|
|
1253
1230
|
"react-x": {
|
|
1254
|
-
readonly
|
|
1255
|
-
|
|
1256
|
-
|
|
1231
|
+
readonly importSource: "react";
|
|
1232
|
+
readonly jsxPragma: "createElement";
|
|
1233
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1257
1234
|
readonly polymorphicPropName: "as";
|
|
1235
|
+
readonly strict: false;
|
|
1258
1236
|
readonly strictImportCheck: false;
|
|
1259
1237
|
readonly version: "detect";
|
|
1238
|
+
readonly additionalHooks: {
|
|
1239
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1240
|
+
};
|
|
1241
|
+
readonly additionalComponents?: {
|
|
1242
|
+
name: string;
|
|
1243
|
+
as?: string;
|
|
1244
|
+
attributes?: {
|
|
1245
|
+
name: string;
|
|
1246
|
+
as?: string;
|
|
1247
|
+
controlled?: boolean;
|
|
1248
|
+
defaultValue?: string;
|
|
1249
|
+
}[];
|
|
1250
|
+
selector?: string;
|
|
1251
|
+
}[];
|
|
1260
1252
|
};
|
|
1261
1253
|
};
|
|
1262
1254
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
import { RulePreset } from '@eslint-react/shared';
|
|
2
3
|
|
|
3
4
|
declare const name$b = "@eslint-react/all";
|
|
4
5
|
declare const rules$b: {
|
|
@@ -231,12 +232,27 @@ declare const plugins$6: {
|
|
|
231
232
|
};
|
|
232
233
|
declare const settings$5: {
|
|
233
234
|
"react-x": {
|
|
234
|
-
readonly
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
readonly importSource: "react";
|
|
236
|
+
readonly jsxPragma: "createElement";
|
|
237
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
237
238
|
readonly polymorphicPropName: "as";
|
|
239
|
+
readonly strict: false;
|
|
238
240
|
readonly strictImportCheck: false;
|
|
239
241
|
readonly version: "detect";
|
|
242
|
+
readonly additionalHooks: {
|
|
243
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
244
|
+
};
|
|
245
|
+
readonly additionalComponents?: {
|
|
246
|
+
name: string;
|
|
247
|
+
as?: string;
|
|
248
|
+
attributes?: {
|
|
249
|
+
name: string;
|
|
250
|
+
as?: string;
|
|
251
|
+
controlled?: boolean;
|
|
252
|
+
defaultValue?: string;
|
|
253
|
+
}[];
|
|
254
|
+
selector?: string;
|
|
255
|
+
}[];
|
|
240
256
|
};
|
|
241
257
|
};
|
|
242
258
|
|
|
@@ -351,12 +367,27 @@ declare const plugins$5: {
|
|
|
351
367
|
};
|
|
352
368
|
declare const settings$4: {
|
|
353
369
|
"react-x": {
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
|
|
370
|
+
readonly importSource: "react";
|
|
371
|
+
readonly jsxPragma: "createElement";
|
|
372
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
357
373
|
readonly polymorphicPropName: "as";
|
|
374
|
+
readonly strict: false;
|
|
358
375
|
readonly strictImportCheck: false;
|
|
359
376
|
readonly version: "detect";
|
|
377
|
+
readonly additionalHooks: {
|
|
378
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
379
|
+
};
|
|
380
|
+
readonly additionalComponents?: {
|
|
381
|
+
name: string;
|
|
382
|
+
as?: string;
|
|
383
|
+
attributes?: {
|
|
384
|
+
name: string;
|
|
385
|
+
as?: string;
|
|
386
|
+
controlled?: boolean;
|
|
387
|
+
defaultValue?: string;
|
|
388
|
+
}[];
|
|
389
|
+
selector?: string;
|
|
390
|
+
}[];
|
|
360
391
|
};
|
|
361
392
|
};
|
|
362
393
|
|
|
@@ -392,53 +423,28 @@ declare namespace debugConfig {
|
|
|
392
423
|
}
|
|
393
424
|
|
|
394
425
|
declare const name$8 = "@eslint-react/disable-debug";
|
|
395
|
-
declare const rules$8:
|
|
396
|
-
"@eslint-react/debug/class-component"?: "off";
|
|
397
|
-
"@eslint-react/debug/function-component"?: "off";
|
|
398
|
-
"@eslint-react/debug/hook"?: "off";
|
|
399
|
-
"@eslint-react/debug/is-from-react"?: "off";
|
|
400
|
-
};
|
|
426
|
+
declare const rules$8: RulePreset;
|
|
401
427
|
|
|
402
428
|
declare namespace disableDebugConfig {
|
|
403
429
|
export { name$8 as name, rules$8 as rules };
|
|
404
430
|
}
|
|
405
431
|
|
|
406
432
|
declare const name$7 = "@eslint-react/disable-dom";
|
|
407
|
-
declare const rules$7:
|
|
408
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml"?: "off";
|
|
409
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children"?: "off";
|
|
410
|
-
"@eslint-react/dom/no-find-dom-node"?: "off";
|
|
411
|
-
"@eslint-react/dom/no-missing-button-type"?: "off";
|
|
412
|
-
"@eslint-react/dom/no-missing-iframe-sandbox"?: "off";
|
|
413
|
-
"@eslint-react/dom/no-namespace"?: "off";
|
|
414
|
-
"@eslint-react/dom/no-render-return-value"?: "off";
|
|
415
|
-
"@eslint-react/dom/no-script-url"?: "off";
|
|
416
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox"?: "off";
|
|
417
|
-
"@eslint-react/dom/no-unsafe-target-blank"?: "off";
|
|
418
|
-
"@eslint-react/dom/no-void-elements-with-children"?: "off";
|
|
419
|
-
};
|
|
433
|
+
declare const rules$7: RulePreset;
|
|
420
434
|
|
|
421
435
|
declare namespace disableDomConfig {
|
|
422
436
|
export { name$7 as name, rules$7 as rules };
|
|
423
437
|
}
|
|
424
438
|
|
|
425
439
|
declare const name$6 = "@eslint-react/disable-type-checked";
|
|
426
|
-
declare const rules$6:
|
|
427
|
-
readonly "@eslint-react/no-leaked-conditional-rendering": "off";
|
|
428
|
-
readonly "@eslint-react/prefer-read-only-props": "off";
|
|
429
|
-
};
|
|
440
|
+
declare const rules$6: RulePreset;
|
|
430
441
|
|
|
431
442
|
declare namespace disableTypeCheckedConfig {
|
|
432
443
|
export { name$6 as name, rules$6 as rules };
|
|
433
444
|
}
|
|
434
445
|
|
|
435
446
|
declare const name$5 = "@eslint-react/disable-web-api";
|
|
436
|
-
declare const rules$5:
|
|
437
|
-
"@eslint-react/web-api/no-leaked-event-listener"?: "off";
|
|
438
|
-
"@eslint-react/web-api/no-leaked-interval"?: "off";
|
|
439
|
-
"@eslint-react/web-api/no-leaked-resize-observer"?: "off";
|
|
440
|
-
"@eslint-react/web-api/no-leaked-timeout"?: "off";
|
|
441
|
-
};
|
|
447
|
+
declare const rules$5: RulePreset;
|
|
442
448
|
|
|
443
449
|
declare namespace disableWebApiConfig {
|
|
444
450
|
export { name$5 as name, rules$5 as rules };
|
|
@@ -483,12 +489,27 @@ declare const plugins$3: {
|
|
|
483
489
|
};
|
|
484
490
|
declare const settings$3: {
|
|
485
491
|
"react-x": {
|
|
486
|
-
readonly
|
|
487
|
-
|
|
488
|
-
|
|
492
|
+
readonly importSource: "react";
|
|
493
|
+
readonly jsxPragma: "createElement";
|
|
494
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
489
495
|
readonly polymorphicPropName: "as";
|
|
496
|
+
readonly strict: false;
|
|
490
497
|
readonly strictImportCheck: false;
|
|
491
498
|
readonly version: "detect";
|
|
499
|
+
readonly additionalHooks: {
|
|
500
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
501
|
+
};
|
|
502
|
+
readonly additionalComponents?: {
|
|
503
|
+
name: string;
|
|
504
|
+
as?: string;
|
|
505
|
+
attributes?: {
|
|
506
|
+
name: string;
|
|
507
|
+
as?: string;
|
|
508
|
+
controlled?: boolean;
|
|
509
|
+
defaultValue?: string;
|
|
510
|
+
}[];
|
|
511
|
+
selector?: string;
|
|
512
|
+
}[];
|
|
492
513
|
};
|
|
493
514
|
};
|
|
494
515
|
|
|
@@ -497,81 +518,7 @@ declare namespace domConfig {
|
|
|
497
518
|
}
|
|
498
519
|
|
|
499
520
|
declare const name$3 = "@eslint-react/off";
|
|
500
|
-
declare const rules$3:
|
|
501
|
-
"@eslint-react/no-leaked-conditional-rendering": "off";
|
|
502
|
-
"@eslint-react/prefer-read-only-props": "off";
|
|
503
|
-
"@eslint-react/ensure-forward-ref-using-ref"?: "off";
|
|
504
|
-
"@eslint-react/no-access-state-in-setstate"?: "off";
|
|
505
|
-
"@eslint-react/no-array-index-key"?: "off";
|
|
506
|
-
"@eslint-react/no-children-count"?: "off";
|
|
507
|
-
"@eslint-react/no-children-for-each"?: "off";
|
|
508
|
-
"@eslint-react/no-children-map"?: "off";
|
|
509
|
-
"@eslint-react/no-children-only"?: "off";
|
|
510
|
-
"@eslint-react/no-children-prop"?: "off";
|
|
511
|
-
"@eslint-react/no-children-to-array"?: "off";
|
|
512
|
-
"@eslint-react/no-class-component"?: "off";
|
|
513
|
-
"@eslint-react/no-clone-element"?: "off";
|
|
514
|
-
"@eslint-react/no-comment-textnodes"?: "off";
|
|
515
|
-
"@eslint-react/no-complex-conditional-rendering"?: "off";
|
|
516
|
-
"@eslint-react/no-component-will-mount"?: "off";
|
|
517
|
-
"@eslint-react/no-component-will-receive-props"?: "off";
|
|
518
|
-
"@eslint-react/no-component-will-update"?: "off";
|
|
519
|
-
"@eslint-react/no-context-provider"?: "off";
|
|
520
|
-
"@eslint-react/no-create-ref"?: "off";
|
|
521
|
-
"@eslint-react/no-default-props"?: "off";
|
|
522
|
-
"@eslint-react/no-direct-mutation-state"?: "off";
|
|
523
|
-
"@eslint-react/no-duplicate-jsx-props"?: "off";
|
|
524
|
-
"@eslint-react/no-duplicate-key"?: "off";
|
|
525
|
-
"@eslint-react/no-forward-ref"?: "off";
|
|
526
|
-
"@eslint-react/no-implicit-key"?: "off";
|
|
527
|
-
"@eslint-react/no-missing-component-display-name"?: "off";
|
|
528
|
-
"@eslint-react/no-missing-key"?: "off";
|
|
529
|
-
"@eslint-react/no-nested-components"?: "off";
|
|
530
|
-
"@eslint-react/no-prop-types"?: "off";
|
|
531
|
-
"@eslint-react/no-redundant-should-component-update"?: "off";
|
|
532
|
-
"@eslint-react/no-set-state-in-component-did-mount"?: "off";
|
|
533
|
-
"@eslint-react/no-set-state-in-component-did-update"?: "off";
|
|
534
|
-
"@eslint-react/no-set-state-in-component-will-update"?: "off";
|
|
535
|
-
"@eslint-react/no-string-refs"?: "off";
|
|
536
|
-
"@eslint-react/no-unsafe-component-will-mount"?: "off";
|
|
537
|
-
"@eslint-react/no-unsafe-component-will-receive-props"?: "off";
|
|
538
|
-
"@eslint-react/no-unsafe-component-will-update"?: "off";
|
|
539
|
-
"@eslint-react/no-unstable-context-value"?: "off";
|
|
540
|
-
"@eslint-react/no-unstable-default-props"?: "off";
|
|
541
|
-
"@eslint-react/no-unused-class-component-members"?: "off";
|
|
542
|
-
"@eslint-react/no-unused-state"?: "off";
|
|
543
|
-
"@eslint-react/no-useless-fragment"?: "off";
|
|
544
|
-
"@eslint-react/prefer-destructuring-assignment"?: "off";
|
|
545
|
-
"@eslint-react/prefer-shorthand-boolean"?: "off";
|
|
546
|
-
"@eslint-react/prefer-shorthand-fragment"?: "off";
|
|
547
|
-
"@eslint-react/use-jsx-vars"?: "off";
|
|
548
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml"?: "off";
|
|
549
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children"?: "off";
|
|
550
|
-
"@eslint-react/dom/no-find-dom-node"?: "off";
|
|
551
|
-
"@eslint-react/dom/no-missing-button-type"?: "off";
|
|
552
|
-
"@eslint-react/dom/no-missing-iframe-sandbox"?: "off";
|
|
553
|
-
"@eslint-react/dom/no-namespace"?: "off";
|
|
554
|
-
"@eslint-react/dom/no-render-return-value"?: "off";
|
|
555
|
-
"@eslint-react/dom/no-script-url"?: "off";
|
|
556
|
-
"@eslint-react/dom/no-unknown-property"?: "off";
|
|
557
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox"?: "off";
|
|
558
|
-
"@eslint-react/dom/no-unsafe-target-blank"?: "off";
|
|
559
|
-
"@eslint-react/dom/no-void-elements-with-children"?: "off";
|
|
560
|
-
"@eslint-react/web-api/no-leaked-event-listener"?: "off";
|
|
561
|
-
"@eslint-react/web-api/no-leaked-interval"?: "off";
|
|
562
|
-
"@eslint-react/web-api/no-leaked-resize-observer"?: "off";
|
|
563
|
-
"@eslint-react/web-api/no-leaked-timeout"?: "off";
|
|
564
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect"?: "off";
|
|
565
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect"?: "off";
|
|
566
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-callback"?: "off";
|
|
567
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-memo"?: "off";
|
|
568
|
-
"@eslint-react/hooks-extra/no-useless-custom-hooks"?: "off";
|
|
569
|
-
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization"?: "off";
|
|
570
|
-
"@eslint-react/naming-convention/component-name"?: "off";
|
|
571
|
-
"@eslint-react/naming-convention/filename"?: "off";
|
|
572
|
-
"@eslint-react/naming-convention/filename-extension"?: "off";
|
|
573
|
-
"@eslint-react/naming-convention/use-state"?: "off";
|
|
574
|
-
};
|
|
521
|
+
declare const rules$3: RulePreset;
|
|
575
522
|
|
|
576
523
|
declare namespace offConfig {
|
|
577
524
|
export { name$3 as name, rules$3 as rules };
|
|
@@ -792,12 +739,27 @@ declare const plugins$2: {
|
|
|
792
739
|
};
|
|
793
740
|
declare const settings$2: {
|
|
794
741
|
"react-x": {
|
|
795
|
-
readonly
|
|
796
|
-
|
|
797
|
-
|
|
742
|
+
readonly importSource: "react";
|
|
743
|
+
readonly jsxPragma: "createElement";
|
|
744
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
798
745
|
readonly polymorphicPropName: "as";
|
|
746
|
+
readonly strict: false;
|
|
799
747
|
readonly strictImportCheck: false;
|
|
800
748
|
readonly version: "detect";
|
|
749
|
+
readonly additionalHooks: {
|
|
750
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
751
|
+
};
|
|
752
|
+
readonly additionalComponents?: {
|
|
753
|
+
name: string;
|
|
754
|
+
as?: string;
|
|
755
|
+
attributes?: {
|
|
756
|
+
name: string;
|
|
757
|
+
as?: string;
|
|
758
|
+
controlled?: boolean;
|
|
759
|
+
defaultValue?: string;
|
|
760
|
+
}[];
|
|
761
|
+
selector?: string;
|
|
762
|
+
}[];
|
|
801
763
|
};
|
|
802
764
|
};
|
|
803
765
|
|
|
@@ -1022,12 +984,27 @@ declare const plugins$1: {
|
|
|
1022
984
|
};
|
|
1023
985
|
declare const settings$1: {
|
|
1024
986
|
"react-x": {
|
|
1025
|
-
readonly
|
|
1026
|
-
|
|
1027
|
-
|
|
987
|
+
readonly importSource: "react";
|
|
988
|
+
readonly jsxPragma: "createElement";
|
|
989
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1028
990
|
readonly polymorphicPropName: "as";
|
|
991
|
+
readonly strict: false;
|
|
1029
992
|
readonly strictImportCheck: false;
|
|
1030
993
|
readonly version: "detect";
|
|
994
|
+
readonly additionalHooks: {
|
|
995
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
996
|
+
};
|
|
997
|
+
readonly additionalComponents?: {
|
|
998
|
+
name: string;
|
|
999
|
+
as?: string;
|
|
1000
|
+
attributes?: {
|
|
1001
|
+
name: string;
|
|
1002
|
+
as?: string;
|
|
1003
|
+
controlled?: boolean;
|
|
1004
|
+
defaultValue?: string;
|
|
1005
|
+
}[];
|
|
1006
|
+
selector?: string;
|
|
1007
|
+
}[];
|
|
1031
1008
|
};
|
|
1032
1009
|
};
|
|
1033
1010
|
|
|
@@ -1251,12 +1228,27 @@ declare const plugins: {
|
|
|
1251
1228
|
};
|
|
1252
1229
|
declare const settings: {
|
|
1253
1230
|
"react-x": {
|
|
1254
|
-
readonly
|
|
1255
|
-
|
|
1256
|
-
|
|
1231
|
+
readonly importSource: "react";
|
|
1232
|
+
readonly jsxPragma: "createElement";
|
|
1233
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1257
1234
|
readonly polymorphicPropName: "as";
|
|
1235
|
+
readonly strict: false;
|
|
1258
1236
|
readonly strictImportCheck: false;
|
|
1259
1237
|
readonly version: "detect";
|
|
1238
|
+
readonly additionalHooks: {
|
|
1239
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1240
|
+
};
|
|
1241
|
+
readonly additionalComponents?: {
|
|
1242
|
+
name: string;
|
|
1243
|
+
as?: string;
|
|
1244
|
+
attributes?: {
|
|
1245
|
+
name: string;
|
|
1246
|
+
as?: string;
|
|
1247
|
+
controlled?: boolean;
|
|
1248
|
+
defaultValue?: string;
|
|
1249
|
+
}[];
|
|
1250
|
+
selector?: string;
|
|
1251
|
+
}[];
|
|
1260
1252
|
};
|
|
1261
1253
|
};
|
|
1262
1254
|
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __export = (target, all) => {
|
|
|
25
25
|
|
|
26
26
|
// package.json
|
|
27
27
|
var name = "@eslint-react/eslint-plugin";
|
|
28
|
-
var version = "1.24.
|
|
28
|
+
var version = "1.24.1-beta.1";
|
|
29
29
|
|
|
30
30
|
// src/configs/all.ts
|
|
31
31
|
var all_exports = {};
|
|
@@ -235,40 +235,8 @@ __export(disable_debug_exports, {
|
|
|
235
235
|
name: () => name6,
|
|
236
236
|
rules: () => rules5
|
|
237
237
|
});
|
|
238
|
-
|
|
239
|
-
// src/utils/entries.ts
|
|
240
|
-
function entries(...args) {
|
|
241
|
-
return Object.entries(args);
|
|
242
|
-
}
|
|
243
|
-
function fromEntries(...args) {
|
|
244
|
-
return Object.fromEntries(args);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// src/utils/type-of.ts
|
|
248
|
-
function typeOf(t) {
|
|
249
|
-
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// src/utils/transform-keys.ts
|
|
253
|
-
function transformKeys(obj, transform) {
|
|
254
|
-
if (typeOf(obj) !== "object") {
|
|
255
|
-
return obj;
|
|
256
|
-
}
|
|
257
|
-
const res = {};
|
|
258
|
-
for (const key in obj) {
|
|
259
|
-
res[transform(key)] = obj[key];
|
|
260
|
-
}
|
|
261
|
-
return res;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// src/utils/pad-keys-left.ts
|
|
265
|
-
function padKeysLeft(obj, left) {
|
|
266
|
-
return transformKeys(obj, (key) => `${left}${key}`);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// src/configs/disable-debug.ts
|
|
270
238
|
var name6 = "@eslint-react/disable-debug";
|
|
271
|
-
var rules5 = fromEntries(entries(rules4).map(([
|
|
239
|
+
var rules5 = Object.fromEntries(Object.entries(rules4).map(([rule]) => [rule, "off"]));
|
|
272
240
|
|
|
273
241
|
// src/configs/disable-dom.ts
|
|
274
242
|
var disable_dom_exports = {};
|
|
@@ -277,7 +245,7 @@ __export(disable_dom_exports, {
|
|
|
277
245
|
rules: () => rules6
|
|
278
246
|
});
|
|
279
247
|
var name7 = "@eslint-react/disable-dom";
|
|
280
|
-
var rules6 = fromEntries(entries(rules2).map(([key]) => [key, "off"]));
|
|
248
|
+
var rules6 = Object.fromEntries(Object.entries(rules2).map(([key]) => [key, "off"]));
|
|
281
249
|
|
|
282
250
|
// src/configs/disable-type-checked.ts
|
|
283
251
|
var disable_type_checked_exports = {};
|
|
@@ -309,7 +277,7 @@ var plugins5 = {
|
|
|
309
277
|
|
|
310
278
|
// src/configs/disable-web-api.ts
|
|
311
279
|
var name9 = "@eslint-react/disable-web-api";
|
|
312
|
-
var rules9 = fromEntries(entries(rules8).map(([key]) => [key, "off"]));
|
|
280
|
+
var rules9 = Object.fromEntries(Object.entries(rules8).map(([key]) => [key, "off"]));
|
|
313
281
|
|
|
314
282
|
// src/configs/off.ts
|
|
315
283
|
var off_exports = {};
|
|
@@ -319,7 +287,7 @@ __export(off_exports, {
|
|
|
319
287
|
});
|
|
320
288
|
var name10 = "@eslint-react/off";
|
|
321
289
|
var rules10 = {
|
|
322
|
-
...fromEntries(entries(rules3).map(([key]) => [key, "off"])),
|
|
290
|
+
...Object.fromEntries(Object.entries(rules3).map(([key]) => [key, "off"])),
|
|
323
291
|
...rules7
|
|
324
292
|
};
|
|
325
293
|
|
|
@@ -397,6 +365,28 @@ var settings7 = {
|
|
|
397
365
|
...settings6
|
|
398
366
|
};
|
|
399
367
|
|
|
368
|
+
// src/utils/type-of.ts
|
|
369
|
+
function typeOf(t) {
|
|
370
|
+
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// src/utils/transform-keys.ts
|
|
374
|
+
function transformKeys(obj, transform) {
|
|
375
|
+
if (typeOf(obj) !== "object") {
|
|
376
|
+
return obj;
|
|
377
|
+
}
|
|
378
|
+
const res = {};
|
|
379
|
+
for (const key in obj) {
|
|
380
|
+
res[transform(key)] = obj[key];
|
|
381
|
+
}
|
|
382
|
+
return res;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// src/utils/pad-keys-left.ts
|
|
386
|
+
function padKeysLeft(obj, left) {
|
|
387
|
+
return transformKeys(obj, (key) => `${left}${key}`);
|
|
388
|
+
}
|
|
389
|
+
|
|
400
390
|
// src/index.ts
|
|
401
391
|
function makeLegacyConfig(config) {
|
|
402
392
|
const { name: drop, ...rest } = config;
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
16
|
var name = "@eslint-react/eslint-plugin";
|
|
17
|
-
var version = "1.24.
|
|
17
|
+
var version = "1.24.1-beta.1";
|
|
18
18
|
|
|
19
19
|
// src/configs/all.ts
|
|
20
20
|
var all_exports = {};
|
|
@@ -224,40 +224,8 @@ __export(disable_debug_exports, {
|
|
|
224
224
|
name: () => name6,
|
|
225
225
|
rules: () => rules5
|
|
226
226
|
});
|
|
227
|
-
|
|
228
|
-
// src/utils/entries.ts
|
|
229
|
-
function entries(...args) {
|
|
230
|
-
return Object.entries(args);
|
|
231
|
-
}
|
|
232
|
-
function fromEntries(...args) {
|
|
233
|
-
return Object.fromEntries(args);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// src/utils/type-of.ts
|
|
237
|
-
function typeOf(t) {
|
|
238
|
-
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// src/utils/transform-keys.ts
|
|
242
|
-
function transformKeys(obj, transform) {
|
|
243
|
-
if (typeOf(obj) !== "object") {
|
|
244
|
-
return obj;
|
|
245
|
-
}
|
|
246
|
-
const res = {};
|
|
247
|
-
for (const key in obj) {
|
|
248
|
-
res[transform(key)] = obj[key];
|
|
249
|
-
}
|
|
250
|
-
return res;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// src/utils/pad-keys-left.ts
|
|
254
|
-
function padKeysLeft(obj, left) {
|
|
255
|
-
return transformKeys(obj, (key) => `${left}${key}`);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// src/configs/disable-debug.ts
|
|
259
227
|
var name6 = "@eslint-react/disable-debug";
|
|
260
|
-
var rules5 = fromEntries(entries(rules4).map(([
|
|
228
|
+
var rules5 = Object.fromEntries(Object.entries(rules4).map(([rule]) => [rule, "off"]));
|
|
261
229
|
|
|
262
230
|
// src/configs/disable-dom.ts
|
|
263
231
|
var disable_dom_exports = {};
|
|
@@ -266,7 +234,7 @@ __export(disable_dom_exports, {
|
|
|
266
234
|
rules: () => rules6
|
|
267
235
|
});
|
|
268
236
|
var name7 = "@eslint-react/disable-dom";
|
|
269
|
-
var rules6 = fromEntries(entries(rules2).map(([key]) => [key, "off"]));
|
|
237
|
+
var rules6 = Object.fromEntries(Object.entries(rules2).map(([key]) => [key, "off"]));
|
|
270
238
|
|
|
271
239
|
// src/configs/disable-type-checked.ts
|
|
272
240
|
var disable_type_checked_exports = {};
|
|
@@ -298,7 +266,7 @@ var plugins5 = {
|
|
|
298
266
|
|
|
299
267
|
// src/configs/disable-web-api.ts
|
|
300
268
|
var name9 = "@eslint-react/disable-web-api";
|
|
301
|
-
var rules9 = fromEntries(entries(rules8).map(([key]) => [key, "off"]));
|
|
269
|
+
var rules9 = Object.fromEntries(Object.entries(rules8).map(([key]) => [key, "off"]));
|
|
302
270
|
|
|
303
271
|
// src/configs/off.ts
|
|
304
272
|
var off_exports = {};
|
|
@@ -308,7 +276,7 @@ __export(off_exports, {
|
|
|
308
276
|
});
|
|
309
277
|
var name10 = "@eslint-react/off";
|
|
310
278
|
var rules10 = {
|
|
311
|
-
...fromEntries(entries(rules3).map(([key]) => [key, "off"])),
|
|
279
|
+
...Object.fromEntries(Object.entries(rules3).map(([key]) => [key, "off"])),
|
|
312
280
|
...rules7
|
|
313
281
|
};
|
|
314
282
|
|
|
@@ -386,6 +354,28 @@ var settings7 = {
|
|
|
386
354
|
...settings6
|
|
387
355
|
};
|
|
388
356
|
|
|
357
|
+
// src/utils/type-of.ts
|
|
358
|
+
function typeOf(t) {
|
|
359
|
+
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// src/utils/transform-keys.ts
|
|
363
|
+
function transformKeys(obj, transform) {
|
|
364
|
+
if (typeOf(obj) !== "object") {
|
|
365
|
+
return obj;
|
|
366
|
+
}
|
|
367
|
+
const res = {};
|
|
368
|
+
for (const key in obj) {
|
|
369
|
+
res[transform(key)] = obj[key];
|
|
370
|
+
}
|
|
371
|
+
return res;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// src/utils/pad-keys-left.ts
|
|
375
|
+
function padKeysLeft(obj, left) {
|
|
376
|
+
return transformKeys(obj, (key) => `${left}${key}`);
|
|
377
|
+
}
|
|
378
|
+
|
|
389
379
|
// src/index.ts
|
|
390
380
|
function makeLegacyConfig(config) {
|
|
391
381
|
const { name: drop, ...rest } = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/eslint-plugin",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.1-beta.1",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"./package.json"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
48
|
-
"@typescript-eslint/type-utils": "^8.
|
|
49
|
-
"@typescript-eslint/types": "^8.
|
|
50
|
-
"@typescript-eslint/utils": "^8.
|
|
51
|
-
"@eslint-react/eff": "1.24.
|
|
52
|
-
"
|
|
53
|
-
"eslint-plugin-react-
|
|
54
|
-
"eslint-plugin-react-
|
|
55
|
-
"eslint-plugin-react-
|
|
56
|
-
"eslint-
|
|
57
|
-
"eslint-plugin-react-web-api": "1.24.
|
|
58
|
-
"eslint-plugin-react-x": "1.24.
|
|
47
|
+
"@typescript-eslint/scope-manager": "^8.21.0",
|
|
48
|
+
"@typescript-eslint/type-utils": "^8.21.0",
|
|
49
|
+
"@typescript-eslint/types": "^8.21.0",
|
|
50
|
+
"@typescript-eslint/utils": "^8.21.0",
|
|
51
|
+
"@eslint-react/eff": "1.24.1-beta.1",
|
|
52
|
+
"eslint-plugin-react-dom": "1.24.1-beta.1",
|
|
53
|
+
"eslint-plugin-react-debug": "1.24.1-beta.1",
|
|
54
|
+
"eslint-plugin-react-hooks-extra": "1.24.1-beta.1",
|
|
55
|
+
"eslint-plugin-react-naming-convention": "1.24.1-beta.1",
|
|
56
|
+
"@eslint-react/shared": "1.24.1-beta.1",
|
|
57
|
+
"eslint-plugin-react-web-api": "1.24.1-beta.1",
|
|
58
|
+
"eslint-plugin-react-x": "1.24.1-beta.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"tsup": "^8.3.5",
|