@component-hook/eslint-plugin 1.1.2 → 1.1.4
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 -2
- package/dist/index.d.ts +125 -1
- package/dist/index.js +29 -15
- package/package.json +18 -19
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ export default vuePreset;
|
|
|
91
91
|
| basic | `Linter.Config[]` | `eslint-recommended`, `typescript-eslint`, `eslint-plugin-eslint-comments`, `eslint-plugin-import`, `eslint-plugin-unicorn`, `eslint-plugin-jsdoc`, `eslint-plugin-regexp`, `eslint-plugin-de-morgan`, `eslint-plugin-perfectionist` |
|
|
92
92
|
| vue | `Linter.Config[]` | `eslint-plugin-vue`, `typescript-eslint` |
|
|
93
93
|
| react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
|
|
94
|
-
| markdown | `Linter.Config[]` |
|
|
94
|
+
| markdown | `Linter.Config[]` | `@eslint/markdown` |
|
|
95
95
|
| prettier | `Linter.Config` | `eslint-plugin-prettier/recommended` |
|
|
96
96
|
| sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
|
|
97
97
|
| security | `Linter.Config` | `eslint-plugin-security/recommended` |
|
|
@@ -118,7 +118,7 @@ export default vuePreset;
|
|
|
118
118
|
- [eslint-plugin-react-hooks/recommended](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
|
|
119
119
|
- [eslint-plugin-jsx-a11y/recommended](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js)
|
|
120
120
|
- [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue)
|
|
121
|
-
- [eslint
|
|
121
|
+
- [@eslint/markdown](https://github.com/eslint/markdown/blob/main/src/index.js)
|
|
122
122
|
- [eslint-plugin-sonarjs/recommended](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/src/index.ts)
|
|
123
123
|
- [eslint-plugin-security/recommended](https://github.com/eslint-community/eslint-plugin-security/blob/main/index.js)
|
|
124
124
|
- [eslint-plugin-testing-library/dom](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/dom.ts)
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ declare const _default: {
|
|
|
7
7
|
basic: ({
|
|
8
8
|
name: string;
|
|
9
9
|
rules: {
|
|
10
|
+
'no-useless-call': string;
|
|
11
|
+
'no-useless-computed-key': string;
|
|
12
|
+
'no-useless-constructor': string;
|
|
13
|
+
'no-useless-rename': string;
|
|
10
14
|
'no-var': string;
|
|
11
15
|
'no-console': string;
|
|
12
16
|
'no-debugger': string;
|
|
@@ -67,6 +71,7 @@ declare const _default: {
|
|
|
67
71
|
'unicorn/no-unnecessary-array-splice-count': string;
|
|
68
72
|
'unicorn/no-unnecessary-await': string;
|
|
69
73
|
'unicorn/no-unnecessary-slice-end': string;
|
|
74
|
+
'unicorn/no-useless-error-capture-stack-trace': string;
|
|
70
75
|
'unicorn/no-zero-fractions': string;
|
|
71
76
|
'unicorn/prefer-add-event-listener': string;
|
|
72
77
|
'unicorn/prefer-array-find': string;
|
|
@@ -75,6 +80,7 @@ declare const _default: {
|
|
|
75
80
|
'unicorn/prefer-array-some': string;
|
|
76
81
|
'unicorn/prefer-at': string;
|
|
77
82
|
'unicorn/prefer-blob-reading-methods': string;
|
|
83
|
+
'unicorn/prefer-class-fields': string;
|
|
78
84
|
'unicorn/prefer-date-now': string;
|
|
79
85
|
'unicorn/prefer-dom-node-append': string;
|
|
80
86
|
'unicorn/prefer-dom-node-dataset': string;
|
|
@@ -223,6 +229,7 @@ declare const _default: {
|
|
|
223
229
|
clearTimeout: false;
|
|
224
230
|
clientInformation: false;
|
|
225
231
|
Clipboard: false;
|
|
232
|
+
ClipboardChangeEvent: false;
|
|
226
233
|
ClipboardEvent: false;
|
|
227
234
|
ClipboardItem: false;
|
|
228
235
|
close: false;
|
|
@@ -245,6 +252,7 @@ declare const _default: {
|
|
|
245
252
|
CookieStoreManager: false;
|
|
246
253
|
CountQueuingStrategy: false;
|
|
247
254
|
createImageBitmap: false;
|
|
255
|
+
CreateMonitor: false;
|
|
248
256
|
Credential: false;
|
|
249
257
|
credentialless: false;
|
|
250
258
|
CredentialsContainer: false;
|
|
@@ -583,6 +591,7 @@ declare const _default: {
|
|
|
583
591
|
InputDeviceCapabilities: false;
|
|
584
592
|
InputDeviceInfo: false;
|
|
585
593
|
InputEvent: false;
|
|
594
|
+
IntegrityViolationReportBody: false;
|
|
586
595
|
IntersectionObserver: false;
|
|
587
596
|
IntersectionObserverEntry: false;
|
|
588
597
|
isSecureContext: false;
|
|
@@ -898,6 +907,7 @@ declare const _default: {
|
|
|
898
907
|
PushSubscriptionOptions: false;
|
|
899
908
|
queryLocalFonts: false;
|
|
900
909
|
queueMicrotask: false;
|
|
910
|
+
QuotaExceededError: false;
|
|
901
911
|
RadioNodeList: false;
|
|
902
912
|
Range: false;
|
|
903
913
|
ReadableByteStreamController: false;
|
|
@@ -1021,6 +1031,7 @@ declare const _default: {
|
|
|
1021
1031
|
SubmitEvent: false;
|
|
1022
1032
|
Subscriber: false;
|
|
1023
1033
|
SubtleCrypto: false;
|
|
1034
|
+
Summarizer: false;
|
|
1024
1035
|
SuppressedError: false;
|
|
1025
1036
|
SVGAElement: false;
|
|
1026
1037
|
SVGAngle: false;
|
|
@@ -1151,6 +1162,7 @@ declare const _default: {
|
|
|
1151
1162
|
TransformStream: false;
|
|
1152
1163
|
TransformStreamDefaultController: false;
|
|
1153
1164
|
TransitionEvent: false;
|
|
1165
|
+
Translator: false;
|
|
1154
1166
|
TreeWalker: false;
|
|
1155
1167
|
TrustedHTML: false;
|
|
1156
1168
|
TrustedScript: false;
|
|
@@ -1182,6 +1194,8 @@ declare const _default: {
|
|
|
1182
1194
|
VideoEncoder: false;
|
|
1183
1195
|
VideoFrame: false;
|
|
1184
1196
|
VideoPlaybackQuality: false;
|
|
1197
|
+
viewport: false;
|
|
1198
|
+
Viewport: false;
|
|
1185
1199
|
ViewTimeline: false;
|
|
1186
1200
|
ViewTransition: false;
|
|
1187
1201
|
ViewTransitionTypeSet: false;
|
|
@@ -1298,7 +1312,42 @@ declare const _default: {
|
|
|
1298
1312
|
})[];
|
|
1299
1313
|
react: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1300
1314
|
vue: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1301
|
-
markdown:
|
|
1315
|
+
markdown: ({
|
|
1316
|
+
name: string;
|
|
1317
|
+
basePath?: string;
|
|
1318
|
+
files?: Array<string | string[]>;
|
|
1319
|
+
ignores?: string[];
|
|
1320
|
+
language?: string;
|
|
1321
|
+
languageOptions?: eslint.Linter.LanguageOptions;
|
|
1322
|
+
linterOptions?: eslint.Linter.LinterOptions;
|
|
1323
|
+
processor?: string | eslint.Linter.Processor;
|
|
1324
|
+
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
1325
|
+
rules?: Partial<eslint.Linter.RulesRecord> | undefined;
|
|
1326
|
+
settings?: Record<string, unknown>;
|
|
1327
|
+
} | {
|
|
1328
|
+
files: string[];
|
|
1329
|
+
name: string;
|
|
1330
|
+
rules: {
|
|
1331
|
+
'no-alert': string;
|
|
1332
|
+
'no-console': string;
|
|
1333
|
+
'no-restricted-imports': string;
|
|
1334
|
+
'no-undef': string;
|
|
1335
|
+
'no-unused-expressions': string;
|
|
1336
|
+
'no-unused-vars': string;
|
|
1337
|
+
'@typescript-eslint/consistent-type-imports': string;
|
|
1338
|
+
'@typescript-eslint/no-extraneous-class': string;
|
|
1339
|
+
'@typescript-eslint/no-namespace': string;
|
|
1340
|
+
'@typescript-eslint/no-redeclare': string;
|
|
1341
|
+
'@typescript-eslint/no-require-imports': string;
|
|
1342
|
+
'@typescript-eslint/no-unused-expressions': string;
|
|
1343
|
+
'@typescript-eslint/no-unused-vars': string;
|
|
1344
|
+
'@typescript-eslint/no-use-before-define': string;
|
|
1345
|
+
'import/no-default-export': string;
|
|
1346
|
+
'sonarjs/no-dead-store': string;
|
|
1347
|
+
'sonarjs/unused-import': string;
|
|
1348
|
+
'sonarjs/no-unused-vars': string;
|
|
1349
|
+
};
|
|
1350
|
+
})[];
|
|
1302
1351
|
prettier: eslint.Linter.Config<eslint.Linter.RulesRecord>;
|
|
1303
1352
|
sonarjs: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1304
1353
|
security: {
|
|
@@ -1312,6 +1361,7 @@ declare const _default: {
|
|
|
1312
1361
|
};
|
|
1313
1362
|
playwright: {
|
|
1314
1363
|
name: string;
|
|
1364
|
+
basePath?: string;
|
|
1315
1365
|
files?: Array<string | string[]>;
|
|
1316
1366
|
ignores?: string[];
|
|
1317
1367
|
language?: string;
|
|
@@ -1333,6 +1383,10 @@ declare const _default: {
|
|
|
1333
1383
|
declare const reactPreset: ({
|
|
1334
1384
|
name: string;
|
|
1335
1385
|
rules: {
|
|
1386
|
+
'no-useless-call': string;
|
|
1387
|
+
'no-useless-computed-key': string;
|
|
1388
|
+
'no-useless-constructor': string;
|
|
1389
|
+
'no-useless-rename': string;
|
|
1336
1390
|
'no-var': string;
|
|
1337
1391
|
'no-console': string;
|
|
1338
1392
|
'no-debugger': string;
|
|
@@ -1393,6 +1447,7 @@ declare const reactPreset: ({
|
|
|
1393
1447
|
'unicorn/no-unnecessary-array-splice-count': string;
|
|
1394
1448
|
'unicorn/no-unnecessary-await': string;
|
|
1395
1449
|
'unicorn/no-unnecessary-slice-end': string;
|
|
1450
|
+
'unicorn/no-useless-error-capture-stack-trace': string;
|
|
1396
1451
|
'unicorn/no-zero-fractions': string;
|
|
1397
1452
|
'unicorn/prefer-add-event-listener': string;
|
|
1398
1453
|
'unicorn/prefer-array-find': string;
|
|
@@ -1401,6 +1456,7 @@ declare const reactPreset: ({
|
|
|
1401
1456
|
'unicorn/prefer-array-some': string;
|
|
1402
1457
|
'unicorn/prefer-at': string;
|
|
1403
1458
|
'unicorn/prefer-blob-reading-methods': string;
|
|
1459
|
+
'unicorn/prefer-class-fields': string;
|
|
1404
1460
|
'unicorn/prefer-date-now': string;
|
|
1405
1461
|
'unicorn/prefer-dom-node-append': string;
|
|
1406
1462
|
'unicorn/prefer-dom-node-dataset': string;
|
|
@@ -1549,6 +1605,7 @@ declare const reactPreset: ({
|
|
|
1549
1605
|
clearTimeout: false;
|
|
1550
1606
|
clientInformation: false;
|
|
1551
1607
|
Clipboard: false;
|
|
1608
|
+
ClipboardChangeEvent: false;
|
|
1552
1609
|
ClipboardEvent: false;
|
|
1553
1610
|
ClipboardItem: false;
|
|
1554
1611
|
close: false;
|
|
@@ -1571,6 +1628,7 @@ declare const reactPreset: ({
|
|
|
1571
1628
|
CookieStoreManager: false;
|
|
1572
1629
|
CountQueuingStrategy: false;
|
|
1573
1630
|
createImageBitmap: false;
|
|
1631
|
+
CreateMonitor: false;
|
|
1574
1632
|
Credential: false;
|
|
1575
1633
|
credentialless: false;
|
|
1576
1634
|
CredentialsContainer: false;
|
|
@@ -1909,6 +1967,7 @@ declare const reactPreset: ({
|
|
|
1909
1967
|
InputDeviceCapabilities: false;
|
|
1910
1968
|
InputDeviceInfo: false;
|
|
1911
1969
|
InputEvent: false;
|
|
1970
|
+
IntegrityViolationReportBody: false;
|
|
1912
1971
|
IntersectionObserver: false;
|
|
1913
1972
|
IntersectionObserverEntry: false;
|
|
1914
1973
|
isSecureContext: false;
|
|
@@ -2224,6 +2283,7 @@ declare const reactPreset: ({
|
|
|
2224
2283
|
PushSubscriptionOptions: false;
|
|
2225
2284
|
queryLocalFonts: false;
|
|
2226
2285
|
queueMicrotask: false;
|
|
2286
|
+
QuotaExceededError: false;
|
|
2227
2287
|
RadioNodeList: false;
|
|
2228
2288
|
Range: false;
|
|
2229
2289
|
ReadableByteStreamController: false;
|
|
@@ -2347,6 +2407,7 @@ declare const reactPreset: ({
|
|
|
2347
2407
|
SubmitEvent: false;
|
|
2348
2408
|
Subscriber: false;
|
|
2349
2409
|
SubtleCrypto: false;
|
|
2410
|
+
Summarizer: false;
|
|
2350
2411
|
SuppressedError: false;
|
|
2351
2412
|
SVGAElement: false;
|
|
2352
2413
|
SVGAngle: false;
|
|
@@ -2477,6 +2538,7 @@ declare const reactPreset: ({
|
|
|
2477
2538
|
TransformStream: false;
|
|
2478
2539
|
TransformStreamDefaultController: false;
|
|
2479
2540
|
TransitionEvent: false;
|
|
2541
|
+
Translator: false;
|
|
2480
2542
|
TreeWalker: false;
|
|
2481
2543
|
TrustedHTML: false;
|
|
2482
2544
|
TrustedScript: false;
|
|
@@ -2508,6 +2570,8 @@ declare const reactPreset: ({
|
|
|
2508
2570
|
VideoEncoder: false;
|
|
2509
2571
|
VideoFrame: false;
|
|
2510
2572
|
VideoPlaybackQuality: false;
|
|
2573
|
+
viewport: false;
|
|
2574
|
+
Viewport: false;
|
|
2511
2575
|
ViewTimeline: false;
|
|
2512
2576
|
ViewTransition: false;
|
|
2513
2577
|
ViewTransitionTypeSet: false;
|
|
@@ -2621,6 +2685,29 @@ declare const reactPreset: ({
|
|
|
2621
2685
|
setImmediate: false;
|
|
2622
2686
|
};
|
|
2623
2687
|
};
|
|
2688
|
+
} | {
|
|
2689
|
+
files: string[];
|
|
2690
|
+
name: string;
|
|
2691
|
+
rules: {
|
|
2692
|
+
'no-alert': string;
|
|
2693
|
+
'no-console': string;
|
|
2694
|
+
'no-restricted-imports': string;
|
|
2695
|
+
'no-undef': string;
|
|
2696
|
+
'no-unused-expressions': string;
|
|
2697
|
+
'no-unused-vars': string;
|
|
2698
|
+
'@typescript-eslint/consistent-type-imports': string;
|
|
2699
|
+
'@typescript-eslint/no-extraneous-class': string;
|
|
2700
|
+
'@typescript-eslint/no-namespace': string;
|
|
2701
|
+
'@typescript-eslint/no-redeclare': string;
|
|
2702
|
+
'@typescript-eslint/no-require-imports': string;
|
|
2703
|
+
'@typescript-eslint/no-unused-expressions': string;
|
|
2704
|
+
'@typescript-eslint/no-unused-vars': string;
|
|
2705
|
+
'@typescript-eslint/no-use-before-define': string;
|
|
2706
|
+
'import/no-default-export': string;
|
|
2707
|
+
'sonarjs/no-dead-store': string;
|
|
2708
|
+
'sonarjs/unused-import': string;
|
|
2709
|
+
'sonarjs/no-unused-vars': string;
|
|
2710
|
+
};
|
|
2624
2711
|
} | {
|
|
2625
2712
|
name: string;
|
|
2626
2713
|
plugins: {
|
|
@@ -2633,6 +2720,10 @@ declare const reactPreset: ({
|
|
|
2633
2720
|
declare const vuePreset: ({
|
|
2634
2721
|
name: string;
|
|
2635
2722
|
rules: {
|
|
2723
|
+
'no-useless-call': string;
|
|
2724
|
+
'no-useless-computed-key': string;
|
|
2725
|
+
'no-useless-constructor': string;
|
|
2726
|
+
'no-useless-rename': string;
|
|
2636
2727
|
'no-var': string;
|
|
2637
2728
|
'no-console': string;
|
|
2638
2729
|
'no-debugger': string;
|
|
@@ -2693,6 +2784,7 @@ declare const vuePreset: ({
|
|
|
2693
2784
|
'unicorn/no-unnecessary-array-splice-count': string;
|
|
2694
2785
|
'unicorn/no-unnecessary-await': string;
|
|
2695
2786
|
'unicorn/no-unnecessary-slice-end': string;
|
|
2787
|
+
'unicorn/no-useless-error-capture-stack-trace': string;
|
|
2696
2788
|
'unicorn/no-zero-fractions': string;
|
|
2697
2789
|
'unicorn/prefer-add-event-listener': string;
|
|
2698
2790
|
'unicorn/prefer-array-find': string;
|
|
@@ -2701,6 +2793,7 @@ declare const vuePreset: ({
|
|
|
2701
2793
|
'unicorn/prefer-array-some': string;
|
|
2702
2794
|
'unicorn/prefer-at': string;
|
|
2703
2795
|
'unicorn/prefer-blob-reading-methods': string;
|
|
2796
|
+
'unicorn/prefer-class-fields': string;
|
|
2704
2797
|
'unicorn/prefer-date-now': string;
|
|
2705
2798
|
'unicorn/prefer-dom-node-append': string;
|
|
2706
2799
|
'unicorn/prefer-dom-node-dataset': string;
|
|
@@ -2849,6 +2942,7 @@ declare const vuePreset: ({
|
|
|
2849
2942
|
clearTimeout: false;
|
|
2850
2943
|
clientInformation: false;
|
|
2851
2944
|
Clipboard: false;
|
|
2945
|
+
ClipboardChangeEvent: false;
|
|
2852
2946
|
ClipboardEvent: false;
|
|
2853
2947
|
ClipboardItem: false;
|
|
2854
2948
|
close: false;
|
|
@@ -2871,6 +2965,7 @@ declare const vuePreset: ({
|
|
|
2871
2965
|
CookieStoreManager: false;
|
|
2872
2966
|
CountQueuingStrategy: false;
|
|
2873
2967
|
createImageBitmap: false;
|
|
2968
|
+
CreateMonitor: false;
|
|
2874
2969
|
Credential: false;
|
|
2875
2970
|
credentialless: false;
|
|
2876
2971
|
CredentialsContainer: false;
|
|
@@ -3209,6 +3304,7 @@ declare const vuePreset: ({
|
|
|
3209
3304
|
InputDeviceCapabilities: false;
|
|
3210
3305
|
InputDeviceInfo: false;
|
|
3211
3306
|
InputEvent: false;
|
|
3307
|
+
IntegrityViolationReportBody: false;
|
|
3212
3308
|
IntersectionObserver: false;
|
|
3213
3309
|
IntersectionObserverEntry: false;
|
|
3214
3310
|
isSecureContext: false;
|
|
@@ -3524,6 +3620,7 @@ declare const vuePreset: ({
|
|
|
3524
3620
|
PushSubscriptionOptions: false;
|
|
3525
3621
|
queryLocalFonts: false;
|
|
3526
3622
|
queueMicrotask: false;
|
|
3623
|
+
QuotaExceededError: false;
|
|
3527
3624
|
RadioNodeList: false;
|
|
3528
3625
|
Range: false;
|
|
3529
3626
|
ReadableByteStreamController: false;
|
|
@@ -3647,6 +3744,7 @@ declare const vuePreset: ({
|
|
|
3647
3744
|
SubmitEvent: false;
|
|
3648
3745
|
Subscriber: false;
|
|
3649
3746
|
SubtleCrypto: false;
|
|
3747
|
+
Summarizer: false;
|
|
3650
3748
|
SuppressedError: false;
|
|
3651
3749
|
SVGAElement: false;
|
|
3652
3750
|
SVGAngle: false;
|
|
@@ -3777,6 +3875,7 @@ declare const vuePreset: ({
|
|
|
3777
3875
|
TransformStream: false;
|
|
3778
3876
|
TransformStreamDefaultController: false;
|
|
3779
3877
|
TransitionEvent: false;
|
|
3878
|
+
Translator: false;
|
|
3780
3879
|
TreeWalker: false;
|
|
3781
3880
|
TrustedHTML: false;
|
|
3782
3881
|
TrustedScript: false;
|
|
@@ -3808,6 +3907,8 @@ declare const vuePreset: ({
|
|
|
3808
3907
|
VideoEncoder: false;
|
|
3809
3908
|
VideoFrame: false;
|
|
3810
3909
|
VideoPlaybackQuality: false;
|
|
3910
|
+
viewport: false;
|
|
3911
|
+
Viewport: false;
|
|
3811
3912
|
ViewTimeline: false;
|
|
3812
3913
|
ViewTransition: false;
|
|
3813
3914
|
ViewTransitionTypeSet: false;
|
|
@@ -3921,6 +4022,29 @@ declare const vuePreset: ({
|
|
|
3921
4022
|
setImmediate: false;
|
|
3922
4023
|
};
|
|
3923
4024
|
};
|
|
4025
|
+
} | {
|
|
4026
|
+
files: string[];
|
|
4027
|
+
name: string;
|
|
4028
|
+
rules: {
|
|
4029
|
+
'no-alert': string;
|
|
4030
|
+
'no-console': string;
|
|
4031
|
+
'no-restricted-imports': string;
|
|
4032
|
+
'no-undef': string;
|
|
4033
|
+
'no-unused-expressions': string;
|
|
4034
|
+
'no-unused-vars': string;
|
|
4035
|
+
'@typescript-eslint/consistent-type-imports': string;
|
|
4036
|
+
'@typescript-eslint/no-extraneous-class': string;
|
|
4037
|
+
'@typescript-eslint/no-namespace': string;
|
|
4038
|
+
'@typescript-eslint/no-redeclare': string;
|
|
4039
|
+
'@typescript-eslint/no-require-imports': string;
|
|
4040
|
+
'@typescript-eslint/no-unused-expressions': string;
|
|
4041
|
+
'@typescript-eslint/no-unused-vars': string;
|
|
4042
|
+
'@typescript-eslint/no-use-before-define': string;
|
|
4043
|
+
'import/no-default-export': string;
|
|
4044
|
+
'sonarjs/no-dead-store': string;
|
|
4045
|
+
'sonarjs/unused-import': string;
|
|
4046
|
+
'sonarjs/no-unused-vars': string;
|
|
4047
|
+
};
|
|
3924
4048
|
} | {
|
|
3925
4049
|
name: string;
|
|
3926
4050
|
plugins: {
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { default as default14 } from "eslint-plugin-playwright";
|
|
|
16
16
|
import { default as default15 } from "eslint-plugin-testing-library";
|
|
17
17
|
import { default as default16 } from "eslint-plugin-regexp";
|
|
18
18
|
import { default as default17 } from "eslint-plugin-import";
|
|
19
|
-
import { default as default18 } from "eslint
|
|
19
|
+
import { default as default18 } from "@eslint/markdown";
|
|
20
20
|
import { default as default19 } from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
21
21
|
import { default as default20 } from "eslint-plugin-unicorn";
|
|
22
22
|
import { default as default21 } from "eslint-plugin-de-morgan";
|
|
@@ -80,7 +80,9 @@ var ignores = {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
// constants.ts
|
|
83
|
+
var SRC = "**/*.?([cm])[jt]s?(x)";
|
|
83
84
|
var SRC_EXT = "?([cm])[jt]s?(x)";
|
|
85
|
+
var VUE = "**/*.vue";
|
|
84
86
|
|
|
85
87
|
// configs/import.ts
|
|
86
88
|
var plugins = {
|
|
@@ -130,6 +132,10 @@ var importConfigs = [
|
|
|
130
132
|
// configs/javascript.ts
|
|
131
133
|
var isProduction = process.env.NODE_ENV === "production";
|
|
132
134
|
var rules = {
|
|
135
|
+
"no-useless-call": "error",
|
|
136
|
+
"no-useless-computed-key": "error",
|
|
137
|
+
"no-useless-constructor": "error",
|
|
138
|
+
"no-useless-rename": "error",
|
|
133
139
|
"no-var": "error",
|
|
134
140
|
"no-console": isProduction ? "warn" : "off",
|
|
135
141
|
"no-debugger": isProduction ? "warn" : "off",
|
|
@@ -178,15 +184,15 @@ var jsdocConfig = {
|
|
|
178
184
|
};
|
|
179
185
|
|
|
180
186
|
// configs/markdown.ts
|
|
181
|
-
var markdownConfigs =
|
|
182
|
-
|
|
183
|
-
const baseConfig = {
|
|
187
|
+
var markdownConfigs = [
|
|
188
|
+
...default18.configs.processor.map((config) => ({
|
|
184
189
|
...config,
|
|
185
|
-
name: `component-hook/${name}`
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
name: `component-hook/${config.name}`
|
|
191
|
+
})),
|
|
192
|
+
{
|
|
193
|
+
files: [`**/*.md/${SRC}`, `**/*.md/${VUE}`],
|
|
194
|
+
name: "component-hook/markdown-rules",
|
|
195
|
+
rules: {
|
|
190
196
|
"no-alert": "off",
|
|
191
197
|
"no-console": "off",
|
|
192
198
|
"no-restricted-imports": "off",
|
|
@@ -205,10 +211,9 @@ var markdownConfigs = default18.configs.recommended.map((config) => {
|
|
|
205
211
|
"sonarjs/no-dead-store": "off",
|
|
206
212
|
"sonarjs/unused-import": "off",
|
|
207
213
|
"sonarjs/no-unused-vars": "off"
|
|
208
|
-
}
|
|
214
|
+
}
|
|
209
215
|
}
|
|
210
|
-
|
|
211
|
-
});
|
|
216
|
+
];
|
|
212
217
|
|
|
213
218
|
// configs/perfectionist.ts
|
|
214
219
|
var perfectionistConfig = {
|
|
@@ -389,6 +394,8 @@ var rules3 = {
|
|
|
389
394
|
"@typescript-eslint/no-unsafe-function-type": "off",
|
|
390
395
|
"@typescript-eslint/no-shadow": "error",
|
|
391
396
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "_" }],
|
|
397
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
398
|
+
"@typescript-eslint/prefer-literal-enum-member": ["error", { allowBitwiseExpressions: true }],
|
|
392
399
|
"@typescript-eslint/no-unused-expressions": [
|
|
393
400
|
"error",
|
|
394
401
|
{
|
|
@@ -429,6 +436,8 @@ var unicornConfig = {
|
|
|
429
436
|
],
|
|
430
437
|
"unicorn/new-for-builtins": "error",
|
|
431
438
|
"unicorn/no-array-method-this-argument": "error",
|
|
439
|
+
// Browser compatibility issues
|
|
440
|
+
// 'unicorn/no-array-reverse': 'error',
|
|
432
441
|
"unicorn/no-await-in-promise-methods": "error",
|
|
433
442
|
"unicorn/no-console-spaces": "error",
|
|
434
443
|
"unicorn/no-for-loop": "error",
|
|
@@ -445,6 +454,7 @@ var unicornConfig = {
|
|
|
445
454
|
"unicorn/no-unnecessary-array-splice-count": "error",
|
|
446
455
|
"unicorn/no-unnecessary-await": "error",
|
|
447
456
|
"unicorn/no-unnecessary-slice-end": "error",
|
|
457
|
+
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
448
458
|
"unicorn/no-zero-fractions": `error`,
|
|
449
459
|
"unicorn/prefer-add-event-listener": "error",
|
|
450
460
|
"unicorn/prefer-array-find": "error",
|
|
@@ -453,6 +463,7 @@ var unicornConfig = {
|
|
|
453
463
|
"unicorn/prefer-array-some": "error",
|
|
454
464
|
"unicorn/prefer-at": "error",
|
|
455
465
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
466
|
+
"unicorn/prefer-class-fields": "error",
|
|
456
467
|
"unicorn/prefer-date-now": "error",
|
|
457
468
|
"unicorn/prefer-dom-node-append": "error",
|
|
458
469
|
"unicorn/prefer-dom-node-dataset": "error",
|
|
@@ -479,6 +490,8 @@ var unicornConfig = {
|
|
|
479
490
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
480
491
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
481
492
|
"unicorn/prefer-type-error": "error",
|
|
493
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2710
|
|
494
|
+
// 'unicorn/require-module-specifiers': 'error',
|
|
482
495
|
"unicorn/throw-new-error": "error"
|
|
483
496
|
}
|
|
484
497
|
};
|
|
@@ -506,6 +519,7 @@ var rules4 = {
|
|
|
506
519
|
"vue/no-constant-condition": "warn",
|
|
507
520
|
"vue/no-empty-pattern": "error",
|
|
508
521
|
"vue/no-loss-of-precision": "error",
|
|
522
|
+
"vue/no-ref-as-operand": "off",
|
|
509
523
|
"vue/no-unused-refs": "error",
|
|
510
524
|
"vue/no-useless-v-bind": "error",
|
|
511
525
|
"vue/no-v-html": "off",
|
|
@@ -527,7 +541,7 @@ var rules4 = {
|
|
|
527
541
|
var extendsTypescript = default4.configs.recommended.filter(({ name }) => name !== "typescript-eslint/base").map((config) => ({ ...config, name: `component-hook/vue/${config.name}` }));
|
|
528
542
|
var eslintConfigTypescript = default4.config({
|
|
529
543
|
extends: extendsTypescript,
|
|
530
|
-
files: [
|
|
544
|
+
files: [VUE],
|
|
531
545
|
name: "component-hook/vue/typescript",
|
|
532
546
|
rules: rules3
|
|
533
547
|
});
|
|
@@ -535,7 +549,7 @@ var vueConfigs = [
|
|
|
535
549
|
...eslintConfigTypescript,
|
|
536
550
|
{
|
|
537
551
|
name: "component-hook/vue/globals",
|
|
538
|
-
files: [
|
|
552
|
+
files: [VUE],
|
|
539
553
|
languageOptions: {
|
|
540
554
|
globals: {
|
|
541
555
|
defineProps: "readonly",
|
|
@@ -555,7 +569,7 @@ var vueConfigs = [
|
|
|
555
569
|
},
|
|
556
570
|
{
|
|
557
571
|
name: "component-hook/vue",
|
|
558
|
-
files: [
|
|
572
|
+
files: [VUE],
|
|
559
573
|
plugins: {
|
|
560
574
|
"@typescript-eslint": default4.plugin,
|
|
561
575
|
vue: default8
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@component-hook/eslint-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "ESLint config for component hook",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,34 +34,33 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
37
|
-
"@eslint/compat": "^1.3.
|
|
38
|
-
"@eslint/js": "^9.
|
|
39
|
-
"eslint
|
|
40
|
-
"eslint-
|
|
37
|
+
"@eslint/compat": "^1.3.2",
|
|
38
|
+
"@eslint/js": "^9.33.0",
|
|
39
|
+
"@eslint/markdown": "^7.1.0",
|
|
40
|
+
"eslint-config-prettier": "^10.1.8",
|
|
41
|
+
"eslint-plugin-de-morgan": "^1.3.1",
|
|
41
42
|
"eslint-plugin-import": "^2.32.0",
|
|
42
|
-
"eslint-plugin-jsdoc": "^51.
|
|
43
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
43
44
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
44
|
-
"eslint-plugin-markdown": "^5.1.0",
|
|
45
45
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
46
|
-
"eslint-plugin-playwright": "^2.2.
|
|
47
|
-
"eslint-plugin-prettier": "^5.5.
|
|
46
|
+
"eslint-plugin-playwright": "^2.2.2",
|
|
47
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
48
48
|
"eslint-plugin-react": "^7.37.5",
|
|
49
49
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
50
|
-
"eslint-plugin-regexp": "^2.
|
|
50
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
51
51
|
"eslint-plugin-security": "^3.0.1",
|
|
52
52
|
"eslint-plugin-sonarjs": "^3.0.4",
|
|
53
|
-
"eslint-plugin-testing-library": "^7.
|
|
54
|
-
"eslint-plugin-unicorn": "^
|
|
55
|
-
"eslint-plugin-vue": "^10.
|
|
56
|
-
"globals": "^16.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
58
|
-
"vue-eslint-parser": "^10.
|
|
53
|
+
"eslint-plugin-testing-library": "^7.6.6",
|
|
54
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
55
|
+
"eslint-plugin-vue": "^10.4.0",
|
|
56
|
+
"globals": "^16.3.0",
|
|
57
|
+
"typescript-eslint": "^8.40.0",
|
|
58
|
+
"vue-eslint-parser": "^10.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@eslint/config-inspector": "^1.
|
|
61
|
+
"@eslint/config-inspector": "^1.2.0",
|
|
62
62
|
"@types/eslint": "^9.6.1",
|
|
63
|
-
"@types/eslint-plugin-security": "^3.0.0"
|
|
64
|
-
"@types/eslint__js": "^9.14.0"
|
|
63
|
+
"@types/eslint-plugin-security": "^3.0.0"
|
|
65
64
|
},
|
|
66
65
|
"scripts": {
|
|
67
66
|
"dev": "eslint-config-inspector --config ../../eslint.config.js",
|