@nelsonlaidev/oxlint-config 0.2.5 → 0.3.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 +10 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +769 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +52 -17
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { mergeWith, pick } from "es-toolkit/object";
|
|
2
|
-
import { getDefaultSelectors } from "eslint-plugin-better-tailwindcss/defaults";
|
|
3
|
-
import { MatcherType, SelectorKind } from "eslint-plugin-better-tailwindcss/types";
|
|
4
2
|
import { isPackageExists } from "local-pkg";
|
|
5
|
-
import reactPlugin from "@eslint-react/eslint-plugin";
|
|
6
|
-
import playwrightPlugin from "eslint-plugin-playwright";
|
|
7
|
-
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
8
|
-
import regexpPlugin from "eslint-plugin-regexp";
|
|
9
|
-
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
10
3
|
//#region src/globs.ts
|
|
11
4
|
const GLOB_SRC_EXT = "{js,jsx,ts,tsx,cjs,cts,mjs,mts}";
|
|
12
5
|
const GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
@@ -15,6 +8,13 @@ const GLOB_JSX = "**/*.{jsx,cjsx,mjsx}";
|
|
|
15
8
|
const GLOB_TS = "**/*.{ts,cts,mts}";
|
|
16
9
|
const GLOB_TSX = "**/*.{tsx,ctsx,mtsx}";
|
|
17
10
|
//#endregion
|
|
11
|
+
//#region src/configs/command.ts
|
|
12
|
+
const command = () => [{
|
|
13
|
+
files: [GLOB_SRC],
|
|
14
|
+
jsPlugins: ["eslint-plugin-command"],
|
|
15
|
+
rules: { "command/command": "error" }
|
|
16
|
+
}];
|
|
17
|
+
//#endregion
|
|
18
18
|
//#region src/configs/de-morgan.ts
|
|
19
19
|
const deMorgan = () => [{
|
|
20
20
|
files: [GLOB_SRC],
|
|
@@ -417,12 +417,763 @@ const oxc = () => [{
|
|
|
417
417
|
}
|
|
418
418
|
}];
|
|
419
419
|
//#endregion
|
|
420
|
+
//#region src/generated/plugin-snapshots.ts
|
|
421
|
+
const reactHooksRecommendedLatestRules = {
|
|
422
|
+
"react-hooks/rules-of-hooks": "error",
|
|
423
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
424
|
+
"react-hooks/static-components": "error",
|
|
425
|
+
"react-hooks/use-memo": "error",
|
|
426
|
+
"react-hooks/void-use-memo": "error",
|
|
427
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
428
|
+
"react-hooks/incompatible-library": "warn",
|
|
429
|
+
"react-hooks/immutability": "error",
|
|
430
|
+
"react-hooks/globals": "error",
|
|
431
|
+
"react-hooks/refs": "error",
|
|
432
|
+
"react-hooks/set-state-in-effect": "error",
|
|
433
|
+
"react-hooks/error-boundaries": "error",
|
|
434
|
+
"react-hooks/purity": "error",
|
|
435
|
+
"react-hooks/set-state-in-render": "error",
|
|
436
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
437
|
+
"react-hooks/config": "error",
|
|
438
|
+
"react-hooks/gating": "error"
|
|
439
|
+
};
|
|
440
|
+
const reactAllRules = {
|
|
441
|
+
"@eslint-react/component-hook-factories": "error",
|
|
442
|
+
"@eslint-react/error-boundaries": "error",
|
|
443
|
+
"@eslint-react/exhaustive-deps": "warn",
|
|
444
|
+
"@eslint-react/immutability": "error",
|
|
445
|
+
"@eslint-react/no-access-state-in-setstate": "error",
|
|
446
|
+
"@eslint-react/no-array-index-key": "warn",
|
|
447
|
+
"@eslint-react/no-children-count": "warn",
|
|
448
|
+
"@eslint-react/no-children-for-each": "warn",
|
|
449
|
+
"@eslint-react/no-children-map": "warn",
|
|
450
|
+
"@eslint-react/no-children-only": "warn",
|
|
451
|
+
"@eslint-react/no-children-to-array": "warn",
|
|
452
|
+
"@eslint-react/no-class-component": "warn",
|
|
453
|
+
"@eslint-react/no-clone-element": "warn",
|
|
454
|
+
"@eslint-react/no-component-will-mount": "error",
|
|
455
|
+
"@eslint-react/no-component-will-receive-props": "error",
|
|
456
|
+
"@eslint-react/no-component-will-update": "error",
|
|
457
|
+
"@eslint-react/no-context-provider": "warn",
|
|
458
|
+
"@eslint-react/no-create-ref": "error",
|
|
459
|
+
"@eslint-react/no-direct-mutation-state": "error",
|
|
460
|
+
"@eslint-react/no-duplicate-key": "error",
|
|
461
|
+
"@eslint-react/no-forward-ref": "warn",
|
|
462
|
+
"@eslint-react/no-missing-component-display-name": "warn",
|
|
463
|
+
"@eslint-react/no-missing-context-display-name": "warn",
|
|
464
|
+
"@eslint-react/no-missing-key": "error",
|
|
465
|
+
"@eslint-react/no-misused-capture-owner-stack": "error",
|
|
466
|
+
"@eslint-react/no-nested-component-definitions": "error",
|
|
467
|
+
"@eslint-react/no-nested-lazy-component-declarations": "error",
|
|
468
|
+
"@eslint-react/no-redundant-should-component-update": "error",
|
|
469
|
+
"@eslint-react/no-set-state-in-component-did-mount": "warn",
|
|
470
|
+
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
471
|
+
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
472
|
+
"@eslint-react/no-unnecessary-use-callback": "warn",
|
|
473
|
+
"@eslint-react/no-unnecessary-use-memo": "warn",
|
|
474
|
+
"@eslint-react/no-unnecessary-use-prefix": "warn",
|
|
475
|
+
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
476
|
+
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
477
|
+
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
478
|
+
"@eslint-react/no-unstable-context-value": "warn",
|
|
479
|
+
"@eslint-react/no-unstable-default-props": "warn",
|
|
480
|
+
"@eslint-react/no-unused-class-component-members": "warn",
|
|
481
|
+
"@eslint-react/no-unused-state": "warn",
|
|
482
|
+
"@eslint-react/no-use-context": "warn",
|
|
483
|
+
"@eslint-react/prefer-destructuring-assignment": "warn",
|
|
484
|
+
"@eslint-react/prefer-namespace-import": "warn",
|
|
485
|
+
"@eslint-react/purity": "warn",
|
|
486
|
+
"@eslint-react/refs": "error",
|
|
487
|
+
"@eslint-react/rules-of-hooks": "error",
|
|
488
|
+
"@eslint-react/set-state-in-effect": "warn",
|
|
489
|
+
"@eslint-react/set-state-in-render": "error",
|
|
490
|
+
"@eslint-react/unsupported-syntax": "error",
|
|
491
|
+
"@eslint-react/use-memo": "error",
|
|
492
|
+
"@eslint-react/use-state": "warn",
|
|
493
|
+
"@eslint-react/jsx-no-children-prop": "warn",
|
|
494
|
+
"@eslint-react/jsx-no-children-prop-with-children": "error",
|
|
495
|
+
"@eslint-react/jsx-no-comment-textnodes": "warn",
|
|
496
|
+
"@eslint-react/jsx-no-deoptimization": "error",
|
|
497
|
+
"@eslint-react/jsx-no-namespace": "error",
|
|
498
|
+
"@eslint-react/jsx-no-useless-fragment": "warn",
|
|
499
|
+
"@eslint-react/rsc-function-definition": "error",
|
|
500
|
+
"@eslint-react/dom-no-dangerously-set-innerhtml": "warn",
|
|
501
|
+
"@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error",
|
|
502
|
+
"@eslint-react/dom-no-find-dom-node": "error",
|
|
503
|
+
"@eslint-react/dom-no-flush-sync": "error",
|
|
504
|
+
"@eslint-react/dom-no-hydrate": "error",
|
|
505
|
+
"@eslint-react/dom-no-missing-button-type": "warn",
|
|
506
|
+
"@eslint-react/dom-no-missing-iframe-sandbox": "warn",
|
|
507
|
+
"@eslint-react/dom-no-render": "error",
|
|
508
|
+
"@eslint-react/dom-no-render-return-value": "error",
|
|
509
|
+
"@eslint-react/dom-no-script-url": "warn",
|
|
510
|
+
"@eslint-react/dom-no-string-style-prop": "error",
|
|
511
|
+
"@eslint-react/dom-no-unknown-property": "warn",
|
|
512
|
+
"@eslint-react/dom-no-unsafe-iframe-sandbox": "warn",
|
|
513
|
+
"@eslint-react/dom-no-unsafe-target-blank": "warn",
|
|
514
|
+
"@eslint-react/dom-no-use-form-state": "warn",
|
|
515
|
+
"@eslint-react/dom-no-void-elements-with-children": "error",
|
|
516
|
+
"@eslint-react/dom-prefer-namespace-import": "warn",
|
|
517
|
+
"@eslint-react/web-api-no-leaked-event-listener": "warn",
|
|
518
|
+
"@eslint-react/web-api-no-leaked-interval": "warn",
|
|
519
|
+
"@eslint-react/web-api-no-leaked-resize-observer": "warn",
|
|
520
|
+
"@eslint-react/web-api-no-leaked-timeout": "warn",
|
|
521
|
+
"@eslint-react/naming-convention-context-name": "warn",
|
|
522
|
+
"@eslint-react/naming-convention-id-name": "warn",
|
|
523
|
+
"@eslint-react/naming-convention-ref-name": "warn"
|
|
524
|
+
};
|
|
525
|
+
const reactDisableConflictReactHooksRules = {
|
|
526
|
+
"react-hooks/exhaustive-deps": "off",
|
|
527
|
+
"react-hooks/rules-of-hooks": "off",
|
|
528
|
+
"react-hooks/component-hook-factories": "off",
|
|
529
|
+
"react-hooks/error-boundaries": "off",
|
|
530
|
+
"react-hooks/immutability": "off",
|
|
531
|
+
"react-hooks/purity": "off",
|
|
532
|
+
"react-hooks/refs": "off",
|
|
533
|
+
"react-hooks/set-state-in-effect": "off",
|
|
534
|
+
"react-hooks/set-state-in-render": "off",
|
|
535
|
+
"react-hooks/static-components": "off",
|
|
536
|
+
"react-hooks/unsupported-syntax": "off",
|
|
537
|
+
"react-hooks/use-memo": "off"
|
|
538
|
+
};
|
|
539
|
+
const playwrightRecommendedRules = {
|
|
540
|
+
"no-empty-pattern": "off",
|
|
541
|
+
"playwright/consistent-spacing-between-blocks": "warn",
|
|
542
|
+
"playwright/expect-expect": "warn",
|
|
543
|
+
"playwright/max-nested-describe": "warn",
|
|
544
|
+
"playwright/missing-playwright-await": "error",
|
|
545
|
+
"playwright/no-conditional-expect": "warn",
|
|
546
|
+
"playwright/no-conditional-in-test": "warn",
|
|
547
|
+
"playwright/no-duplicate-hooks": "warn",
|
|
548
|
+
"playwright/no-duplicate-slow": "warn",
|
|
549
|
+
"playwright/no-element-handle": "warn",
|
|
550
|
+
"playwright/no-eval": "warn",
|
|
551
|
+
"playwright/no-focused-test": "error",
|
|
552
|
+
"playwright/no-force-option": "warn",
|
|
553
|
+
"playwright/no-nested-step": "warn",
|
|
554
|
+
"playwright/no-networkidle": "error",
|
|
555
|
+
"playwright/no-page-pause": "warn",
|
|
556
|
+
"playwright/no-skipped-test": "warn",
|
|
557
|
+
"playwright/no-standalone-expect": "error",
|
|
558
|
+
"playwright/no-unsafe-references": "error",
|
|
559
|
+
"playwright/no-unused-locators": "error",
|
|
560
|
+
"playwright/no-useless-await": "warn",
|
|
561
|
+
"playwright/no-useless-not": "warn",
|
|
562
|
+
"playwright/no-wait-for-navigation": "error",
|
|
563
|
+
"playwright/no-wait-for-selector": "warn",
|
|
564
|
+
"playwright/no-wait-for-timeout": "warn",
|
|
565
|
+
"playwright/prefer-hooks-in-order": "warn",
|
|
566
|
+
"playwright/prefer-hooks-on-top": "warn",
|
|
567
|
+
"playwright/prefer-locator": "warn",
|
|
568
|
+
"playwright/prefer-to-have-count": "warn",
|
|
569
|
+
"playwright/prefer-to-have-length": "warn",
|
|
570
|
+
"playwright/prefer-web-first-assertions": "error",
|
|
571
|
+
"playwright/valid-describe-callback": "error",
|
|
572
|
+
"playwright/valid-expect": "error",
|
|
573
|
+
"playwright/valid-expect-in-promise": "error",
|
|
574
|
+
"playwright/valid-test-tags": "error",
|
|
575
|
+
"playwright/valid-title": "error"
|
|
576
|
+
};
|
|
577
|
+
const regexpRecommendedRules = {
|
|
578
|
+
"no-control-regex": "error",
|
|
579
|
+
"no-misleading-character-class": "error",
|
|
580
|
+
"no-regex-spaces": "error",
|
|
581
|
+
"prefer-regex-literals": "error",
|
|
582
|
+
"no-invalid-regexp": "off",
|
|
583
|
+
"no-useless-backreference": "off",
|
|
584
|
+
"no-empty-character-class": "off",
|
|
585
|
+
"regexp/confusing-quantifier": "warn",
|
|
586
|
+
"regexp/control-character-escape": "error",
|
|
587
|
+
"regexp/match-any": "error",
|
|
588
|
+
"regexp/negation": "error",
|
|
589
|
+
"regexp/no-contradiction-with-assertion": "error",
|
|
590
|
+
"regexp/no-dupe-characters-character-class": "error",
|
|
591
|
+
"regexp/no-dupe-disjunctions": "error",
|
|
592
|
+
"regexp/no-empty-alternative": "warn",
|
|
593
|
+
"regexp/no-empty-capturing-group": "error",
|
|
594
|
+
"regexp/no-empty-character-class": "error",
|
|
595
|
+
"regexp/no-empty-group": "error",
|
|
596
|
+
"regexp/no-empty-lookarounds-assertion": "error",
|
|
597
|
+
"regexp/no-empty-string-literal": "error",
|
|
598
|
+
"regexp/no-escape-backspace": "error",
|
|
599
|
+
"regexp/no-extra-lookaround-assertions": "error",
|
|
600
|
+
"regexp/no-invalid-regexp": "error",
|
|
601
|
+
"regexp/no-invisible-character": "error",
|
|
602
|
+
"regexp/no-lazy-ends": "warn",
|
|
603
|
+
"regexp/no-legacy-features": "error",
|
|
604
|
+
"regexp/no-misleading-capturing-group": "error",
|
|
605
|
+
"regexp/no-misleading-unicode-character": "error",
|
|
606
|
+
"regexp/no-missing-g-flag": "error",
|
|
607
|
+
"regexp/no-non-standard-flag": "error",
|
|
608
|
+
"regexp/no-obscure-range": "error",
|
|
609
|
+
"regexp/no-optional-assertion": "error",
|
|
610
|
+
"regexp/no-potentially-useless-backreference": "warn",
|
|
611
|
+
"regexp/no-super-linear-backtracking": "error",
|
|
612
|
+
"regexp/no-trivially-nested-assertion": "error",
|
|
613
|
+
"regexp/no-trivially-nested-quantifier": "error",
|
|
614
|
+
"regexp/no-unused-capturing-group": "error",
|
|
615
|
+
"regexp/no-useless-assertions": "error",
|
|
616
|
+
"regexp/no-useless-backreference": "error",
|
|
617
|
+
"regexp/no-useless-character-class": "error",
|
|
618
|
+
"regexp/no-useless-dollar-replacements": "error",
|
|
619
|
+
"regexp/no-useless-escape": "error",
|
|
620
|
+
"regexp/no-useless-flag": "warn",
|
|
621
|
+
"regexp/no-useless-lazy": "error",
|
|
622
|
+
"regexp/no-useless-non-capturing-group": "error",
|
|
623
|
+
"regexp/no-useless-quantifier": "error",
|
|
624
|
+
"regexp/no-useless-range": "error",
|
|
625
|
+
"regexp/no-useless-set-operand": "error",
|
|
626
|
+
"regexp/no-useless-string-literal": "error",
|
|
627
|
+
"regexp/no-useless-two-nums-quantifier": "error",
|
|
628
|
+
"regexp/no-zero-quantifier": "error",
|
|
629
|
+
"regexp/optimal-lookaround-quantifier": "warn",
|
|
630
|
+
"regexp/optimal-quantifier-concatenation": "error",
|
|
631
|
+
"regexp/prefer-character-class": "error",
|
|
632
|
+
"regexp/prefer-d": "error",
|
|
633
|
+
"regexp/prefer-plus-quantifier": "error",
|
|
634
|
+
"regexp/prefer-predefined-assertion": "error",
|
|
635
|
+
"regexp/prefer-question-quantifier": "error",
|
|
636
|
+
"regexp/prefer-range": "error",
|
|
637
|
+
"regexp/prefer-set-operation": "error",
|
|
638
|
+
"regexp/prefer-star-quantifier": "error",
|
|
639
|
+
"regexp/prefer-unicode-codepoint-escapes": "error",
|
|
640
|
+
"regexp/prefer-w": "error",
|
|
641
|
+
"regexp/simplify-set-operations": "error",
|
|
642
|
+
"regexp/sort-flags": "error",
|
|
643
|
+
"regexp/strict": "error",
|
|
644
|
+
"regexp/use-ignore-case": "error"
|
|
645
|
+
};
|
|
646
|
+
const sonarjsRecommendedRules = {
|
|
647
|
+
"sonarjs/function-name": "off",
|
|
648
|
+
"sonarjs/class-name": "error",
|
|
649
|
+
"sonarjs/max-lines": "off",
|
|
650
|
+
"sonarjs/no-tab": "off",
|
|
651
|
+
"sonarjs/variable-name": "off",
|
|
652
|
+
"sonarjs/comment-regex": "off",
|
|
653
|
+
"sonarjs/no-commented-code": "off",
|
|
654
|
+
"sonarjs/elseif-without-else": "off",
|
|
655
|
+
"sonarjs/no-fallthrough": "error",
|
|
656
|
+
"sonarjs/nested-control-flow": "off",
|
|
657
|
+
"sonarjs/too-many-break-or-continue-in-loop": "off",
|
|
658
|
+
"sonarjs/max-lines-per-function": "off",
|
|
659
|
+
"sonarjs/no-nested-incdec": "off",
|
|
660
|
+
"sonarjs/no-equals-in-for-termination": "error",
|
|
661
|
+
"sonarjs/no-extra-arguments": "error",
|
|
662
|
+
"sonarjs/no-collapsible-if": "off",
|
|
663
|
+
"sonarjs/expression-complexity": "off",
|
|
664
|
+
"sonarjs/no-redundant-parentheses": "off",
|
|
665
|
+
"sonarjs/no-labels": "error",
|
|
666
|
+
"sonarjs/no-nested-assignment": "error",
|
|
667
|
+
"sonarjs/no-redundant-boolean": "error",
|
|
668
|
+
"sonarjs/prefer-single-boolean-return": "error",
|
|
669
|
+
"sonarjs/unused-import": "error",
|
|
670
|
+
"sonarjs/fixme-tag": "error",
|
|
671
|
+
"sonarjs/todo-tag": "error",
|
|
672
|
+
"sonarjs/useless-string-operation": "off",
|
|
673
|
+
"sonarjs/no-unused-function-argument": "off",
|
|
674
|
+
"sonarjs/no-duplicate-string": "off",
|
|
675
|
+
"sonarjs/no-case-label-in-switch": "error",
|
|
676
|
+
"sonarjs/no-parameter-reassignment": "error",
|
|
677
|
+
"sonarjs/no-floating-point-equality": "error",
|
|
678
|
+
"sonarjs/prefer-while": "error",
|
|
679
|
+
"sonarjs/no-sonar-comments": "off",
|
|
680
|
+
"sonarjs/no-small-switch": "error",
|
|
681
|
+
"sonarjs/no-hardcoded-ip": "error",
|
|
682
|
+
"sonarjs/label-position": "error",
|
|
683
|
+
"sonarjs/public-static-readonly": "error",
|
|
684
|
+
"sonarjs/file-header": "off",
|
|
685
|
+
"sonarjs/call-argument-line": "error",
|
|
686
|
+
"sonarjs/max-switch-cases": "error",
|
|
687
|
+
"sonarjs/no-unused-vars": "error",
|
|
688
|
+
"sonarjs/prefer-immediate-return": "off",
|
|
689
|
+
"sonarjs/function-inside-loop": "error",
|
|
690
|
+
"sonarjs/code-eval": "error",
|
|
691
|
+
"sonarjs/no-variable-usage-before-declaration": "off",
|
|
692
|
+
"sonarjs/future-reserved-words": "error",
|
|
693
|
+
"sonarjs/array-constructor": "off",
|
|
694
|
+
"sonarjs/bitwise-operators": "error",
|
|
695
|
+
"sonarjs/no-function-declaration-in-block": "off",
|
|
696
|
+
"sonarjs/no-primitive-wrappers": "error",
|
|
697
|
+
"sonarjs/for-in": "off",
|
|
698
|
+
"sonarjs/cyclomatic-complexity": "off",
|
|
699
|
+
"sonarjs/no-skipped-tests": "error",
|
|
700
|
+
"sonarjs/no-identical-expressions": "error",
|
|
701
|
+
"sonarjs/no-nested-switch": "off",
|
|
702
|
+
"sonarjs/constructor-for-side-effects": "error",
|
|
703
|
+
"sonarjs/no-dead-store": "error",
|
|
704
|
+
"sonarjs/no-identical-conditions": "error",
|
|
705
|
+
"sonarjs/no-duplicated-branches": "error",
|
|
706
|
+
"sonarjs/deprecation": "error",
|
|
707
|
+
"sonarjs/no-inverted-boolean-check": "error",
|
|
708
|
+
"sonarjs/misplaced-loop-counter": "error",
|
|
709
|
+
"sonarjs/no-nested-functions": "error",
|
|
710
|
+
"sonarjs/no-hardcoded-passwords": "error",
|
|
711
|
+
"sonarjs/sql-queries": "error",
|
|
712
|
+
"sonarjs/insecure-cookie": "error",
|
|
713
|
+
"sonarjs/no-useless-increment": "error",
|
|
714
|
+
"sonarjs/no-globals-shadowing": "error",
|
|
715
|
+
"sonarjs/no-undefined-assignment": "off",
|
|
716
|
+
"sonarjs/no-empty-test-file": "error",
|
|
717
|
+
"sonarjs/no-ignored-return": "error",
|
|
718
|
+
"sonarjs/no-wildcard-import": "off",
|
|
719
|
+
"sonarjs/arguments-order": "error",
|
|
720
|
+
"sonarjs/pseudo-random": "error",
|
|
721
|
+
"sonarjs/for-loop-increment-sign": "error",
|
|
722
|
+
"sonarjs/null-dereference": "error",
|
|
723
|
+
"sonarjs/no-selector-parameter": "error",
|
|
724
|
+
"sonarjs/updated-loop-counter": "error",
|
|
725
|
+
"sonarjs/block-scoped-var": "error",
|
|
726
|
+
"sonarjs/no-built-in-override": "off",
|
|
727
|
+
"sonarjs/prefer-object-literal": "off",
|
|
728
|
+
"sonarjs/no-ignored-exceptions": "error",
|
|
729
|
+
"sonarjs/no-gratuitous-expressions": "error",
|
|
730
|
+
"sonarjs/file-uploads": "error",
|
|
731
|
+
"sonarjs/file-permissions": "error",
|
|
732
|
+
"sonarjs/no-empty-character-class": "error",
|
|
733
|
+
"sonarjs/no-unenclosed-multiline-block": "error",
|
|
734
|
+
"sonarjs/index-of-compare-to-positive-number": "error",
|
|
735
|
+
"sonarjs/assertions-in-tests": "error",
|
|
736
|
+
"sonarjs/no-implicit-global": "error",
|
|
737
|
+
"sonarjs/no-useless-catch": "error",
|
|
738
|
+
"sonarjs/xml-parser-xxe": "error",
|
|
739
|
+
"sonarjs/non-existent-operator": "error",
|
|
740
|
+
"sonarjs/web-sql-database": "off",
|
|
741
|
+
"sonarjs/post-message": "error",
|
|
742
|
+
"sonarjs/no-array-delete": "error",
|
|
743
|
+
"sonarjs/no-alphabetical-sort": "error",
|
|
744
|
+
"sonarjs/no-incomplete-assertions": "error",
|
|
745
|
+
"sonarjs/no-global-this": "error",
|
|
746
|
+
"sonarjs/new-operator-misuse": "error",
|
|
747
|
+
"sonarjs/no-delete-var": "error",
|
|
748
|
+
"sonarjs/strings-comparison": "off",
|
|
749
|
+
"sonarjs/file-name-differ-from-class": "off",
|
|
750
|
+
"sonarjs/cookie-no-httponly": "error",
|
|
751
|
+
"sonarjs/no-nested-conditional": "error",
|
|
752
|
+
"sonarjs/no-incorrect-string-concat": "off",
|
|
753
|
+
"sonarjs/different-types-comparison": "error",
|
|
754
|
+
"sonarjs/inverted-assertion-arguments": "error",
|
|
755
|
+
"sonarjs/shorthand-property-grouping": "off",
|
|
756
|
+
"sonarjs/updated-const-var": "error",
|
|
757
|
+
"sonarjs/arguments-usage": "off",
|
|
758
|
+
"sonarjs/destructuring-assignment-syntax": "off",
|
|
759
|
+
"sonarjs/no-invariant-returns": "error",
|
|
760
|
+
"sonarjs/arrow-function-convention": "off",
|
|
761
|
+
"sonarjs/class-prototype": "off",
|
|
762
|
+
"sonarjs/generator-without-yield": "error",
|
|
763
|
+
"sonarjs/no-require-or-define": "off",
|
|
764
|
+
"sonarjs/no-associative-arrays": "error",
|
|
765
|
+
"sonarjs/comma-or-logical-or-case": "error",
|
|
766
|
+
"sonarjs/no-redundant-jump": "error",
|
|
767
|
+
"sonarjs/inconsistent-function-call": "error",
|
|
768
|
+
"sonarjs/no-use-of-empty-return-value": "error",
|
|
769
|
+
"sonarjs/void-use": "error",
|
|
770
|
+
"sonarjs/operation-returning-nan": "off",
|
|
771
|
+
"sonarjs/values-not-convertible-to-numbers": "off",
|
|
772
|
+
"sonarjs/non-number-in-arithmetic-expression": "off",
|
|
773
|
+
"sonarjs/cognitive-complexity": "error",
|
|
774
|
+
"sonarjs/argument-type": "error",
|
|
775
|
+
"sonarjs/in-operator-type-error": "error",
|
|
776
|
+
"sonarjs/array-callback-without-return": "error",
|
|
777
|
+
"sonarjs/declarations-in-global-scope": "off",
|
|
778
|
+
"sonarjs/function-return-type": "error",
|
|
779
|
+
"sonarjs/no-inconsistent-returns": "off",
|
|
780
|
+
"sonarjs/no-reference-error": "off",
|
|
781
|
+
"sonarjs/no-all-duplicated-branches": "error",
|
|
782
|
+
"sonarjs/no-same-line-conditional": "error",
|
|
783
|
+
"sonarjs/conditional-indentation": "off",
|
|
784
|
+
"sonarjs/no-collection-size-mischeck": "error",
|
|
785
|
+
"sonarjs/no-unthrown-error": "error",
|
|
786
|
+
"sonarjs/no-unused-collection": "error",
|
|
787
|
+
"sonarjs/no-os-command-from-path": "error",
|
|
788
|
+
"sonarjs/no-misleading-array-reverse": "error",
|
|
789
|
+
"sonarjs/no-for-in-iterable": "off",
|
|
790
|
+
"sonarjs/no-element-overwrite": "error",
|
|
791
|
+
"sonarjs/no-identical-functions": "error",
|
|
792
|
+
"sonarjs/no-empty-collection": "error",
|
|
793
|
+
"sonarjs/no-redundant-assignments": "error",
|
|
794
|
+
"sonarjs/prefer-type-guard": "error",
|
|
795
|
+
"sonarjs/use-type-alias": "error",
|
|
796
|
+
"sonarjs/no-return-type-any": "off",
|
|
797
|
+
"sonarjs/no-implicit-dependencies": "off",
|
|
798
|
+
"sonarjs/no-useless-intersection": "error",
|
|
799
|
+
"sonarjs/weak-ssl": "error",
|
|
800
|
+
"sonarjs/no-weak-keys": "error",
|
|
801
|
+
"sonarjs/csrf": "error",
|
|
802
|
+
"sonarjs/production-debug": "error",
|
|
803
|
+
"sonarjs/prefer-default-last": "error",
|
|
804
|
+
"sonarjs/no-in-misuse": "error",
|
|
805
|
+
"sonarjs/no-duplicate-in-composite": "error",
|
|
806
|
+
"sonarjs/max-union-size": "off",
|
|
807
|
+
"sonarjs/no-undefined-argument": "error",
|
|
808
|
+
"sonarjs/no-nested-template-literals": "error",
|
|
809
|
+
"sonarjs/prefer-promise-shorthand": "error",
|
|
810
|
+
"sonarjs/os-command": "off",
|
|
811
|
+
"sonarjs/no-redundant-optional": "error",
|
|
812
|
+
"sonarjs/hashing": "error",
|
|
813
|
+
"sonarjs/bool-param-default": "off",
|
|
814
|
+
"sonarjs/no-try-promise": "error",
|
|
815
|
+
"sonarjs/unverified-certificate": "error",
|
|
816
|
+
"sonarjs/no-unsafe-unzip": "off",
|
|
817
|
+
"sonarjs/cors": "error",
|
|
818
|
+
"sonarjs/link-with-target-blank": "error",
|
|
819
|
+
"sonarjs/disabled-auto-escaping": "error",
|
|
820
|
+
"sonarjs/table-header": "error",
|
|
821
|
+
"sonarjs/no-table-as-layout": "error",
|
|
822
|
+
"sonarjs/table-header-reference": "error",
|
|
823
|
+
"sonarjs/object-alt-content": "error",
|
|
824
|
+
"sonarjs/no-clear-text-protocols": "error",
|
|
825
|
+
"sonarjs/publicly-writable-directories": "error",
|
|
826
|
+
"sonarjs/unverified-hostname": "error",
|
|
827
|
+
"sonarjs/encryption-secure-mode": "error",
|
|
828
|
+
"sonarjs/no-weak-cipher": "error",
|
|
829
|
+
"sonarjs/no-intrusive-permissions": "off",
|
|
830
|
+
"sonarjs/insecure-jwt-token": "error",
|
|
831
|
+
"sonarjs/x-powered-by": "error",
|
|
832
|
+
"sonarjs/hidden-files": "off",
|
|
833
|
+
"sonarjs/content-length": "error",
|
|
834
|
+
"sonarjs/disabled-resource-integrity": "error",
|
|
835
|
+
"sonarjs/content-security-policy": "error",
|
|
836
|
+
"sonarjs/no-mixed-content": "off",
|
|
837
|
+
"sonarjs/frame-ancestors": "off",
|
|
838
|
+
"sonarjs/no-mime-sniff": "error",
|
|
839
|
+
"sonarjs/no-referrer-policy": "error",
|
|
840
|
+
"sonarjs/strict-transport-security": "error",
|
|
841
|
+
"sonarjs/confidential-information-logging": "off",
|
|
842
|
+
"sonarjs/no-ip-forward": "off",
|
|
843
|
+
"sonarjs/empty-string-repetition": "error",
|
|
844
|
+
"sonarjs/regex-complexity": "error",
|
|
845
|
+
"sonarjs/no-incompatible-assertion-types": "error",
|
|
846
|
+
"sonarjs/anchor-precedence": "error",
|
|
847
|
+
"sonarjs/slow-regex": "error",
|
|
848
|
+
"sonarjs/no-invalid-regexp": "error",
|
|
849
|
+
"sonarjs/unused-named-groups": "error",
|
|
850
|
+
"sonarjs/no-same-argument-assert": "error",
|
|
851
|
+
"sonarjs/unicode-aware-regex": "off",
|
|
852
|
+
"sonarjs/no-misleading-character-class": "error",
|
|
853
|
+
"sonarjs/duplicates-in-character-class": "error",
|
|
854
|
+
"sonarjs/session-regeneration": "error",
|
|
855
|
+
"sonarjs/prefer-specific-assertions": "error",
|
|
856
|
+
"sonarjs/no-trivial-assertions": "error",
|
|
857
|
+
"sonarjs/test-check-exception": "error",
|
|
858
|
+
"sonarjs/stable-tests": "error",
|
|
859
|
+
"sonarjs/no-empty-after-reluctant": "error",
|
|
860
|
+
"sonarjs/single-character-alternation": "error",
|
|
861
|
+
"sonarjs/no-code-after-done": "error",
|
|
862
|
+
"sonarjs/disabled-timeout": "error",
|
|
863
|
+
"sonarjs/chai-determinate-assertion": "error",
|
|
864
|
+
"sonarjs/aws-s3-bucket-insecure-http": "error",
|
|
865
|
+
"sonarjs/aws-s3-bucket-versioning": "error",
|
|
866
|
+
"sonarjs/aws-s3-bucket-granted-access": "error",
|
|
867
|
+
"sonarjs/no-angular-bypass-sanitization": "error",
|
|
868
|
+
"sonarjs/aws-iam-public-access": "error",
|
|
869
|
+
"sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
|
|
870
|
+
"sonarjs/aws-s3-bucket-public-access": "error",
|
|
871
|
+
"sonarjs/aws-iam-all-privileges": "error",
|
|
872
|
+
"sonarjs/aws-rds-unencrypted-databases": "error",
|
|
873
|
+
"sonarjs/aws-iam-all-resources-accessible": "off",
|
|
874
|
+
"sonarjs/aws-opensearchservice-domain": "error",
|
|
875
|
+
"sonarjs/aws-iam-privilege-escalation": "error",
|
|
876
|
+
"sonarjs/aws-sagemaker-unencrypted-notebook": "error",
|
|
877
|
+
"sonarjs/aws-restricted-ip-admin-access": "error",
|
|
878
|
+
"sonarjs/no-empty-alternatives": "error",
|
|
879
|
+
"sonarjs/no-control-regex": "error",
|
|
880
|
+
"sonarjs/no-regex-spaces": "error",
|
|
881
|
+
"sonarjs/aws-sns-unencrypted-topics": "error",
|
|
882
|
+
"sonarjs/existing-groups": "error",
|
|
883
|
+
"sonarjs/aws-ec2-rds-dms-public": "error",
|
|
884
|
+
"sonarjs/aws-sqs-unencrypted-queue": "error",
|
|
885
|
+
"sonarjs/no-empty-group": "error",
|
|
886
|
+
"sonarjs/aws-efs-unencrypted": "error",
|
|
887
|
+
"sonarjs/aws-apigateway-public-api": "error",
|
|
888
|
+
"sonarjs/stateful-regex": "error",
|
|
889
|
+
"sonarjs/concise-regex": "error",
|
|
890
|
+
"sonarjs/single-char-in-character-classes": "error",
|
|
891
|
+
"sonarjs/no-hardcoded-secrets": "error",
|
|
892
|
+
"sonarjs/no-exclusive-tests": "error",
|
|
893
|
+
"sonarjs/hardcoded-secret-signatures": "error",
|
|
894
|
+
"sonarjs/jsx-no-leaked-render": "error",
|
|
895
|
+
"sonarjs/no-hook-setter-in-body": "error",
|
|
896
|
+
"sonarjs/no-useless-react-setstate": "error",
|
|
897
|
+
"sonarjs/no-uniq-key": "error",
|
|
898
|
+
"sonarjs/redundant-type-aliases": "error",
|
|
899
|
+
"sonarjs/prefer-regexp-exec": "error",
|
|
900
|
+
"sonarjs/no-internal-api-use": "error",
|
|
901
|
+
"sonarjs/prefer-read-only-props": "error",
|
|
902
|
+
"sonarjs/no-literal-call": "error",
|
|
903
|
+
"sonarjs/reduce-initial-value": "error",
|
|
904
|
+
"sonarjs/no-async-constructor": "error",
|
|
905
|
+
"sonarjs/review-blockchain-mnemonic": "error",
|
|
906
|
+
"sonarjs/dynamically-constructed-templates": "error",
|
|
907
|
+
"sonarjs/no-session-cookies-on-static-assets": "error",
|
|
908
|
+
"sonarjs/dompurify-unsafe-config": "error",
|
|
909
|
+
"sonarjs/no-duplicate-test-title": "error",
|
|
910
|
+
"sonarjs/async-test-assertions": "error",
|
|
911
|
+
"sonarjs/no-empty-test-title": "error",
|
|
912
|
+
"sonarjs/hooks-before-test-cases": "error",
|
|
913
|
+
"sonarjs/no-forced-browser-interaction": "error",
|
|
914
|
+
"sonarjs/super-linear-regex": "error"
|
|
915
|
+
};
|
|
916
|
+
const betterTailwindcssDefaultSelectors = [
|
|
917
|
+
{
|
|
918
|
+
kind: "attribute",
|
|
919
|
+
name: "^class(?:Name)?$"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
kind: "attribute",
|
|
923
|
+
match: [{ type: "strings" }],
|
|
924
|
+
name: "^class(?:Name)?$"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
kind: "attribute",
|
|
928
|
+
match: [{ type: "strings" }],
|
|
929
|
+
name: "^class:.*$"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
kind: "attribute",
|
|
933
|
+
name: "(?:^\\[class\\]$)|(?:^\\[ngClass\\]$)"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
kind: "attribute",
|
|
937
|
+
match: [{ type: "strings" }],
|
|
938
|
+
name: "(?:^\\[class\\..*\\]$)"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
kind: "attribute",
|
|
942
|
+
match: [{ type: "strings" }, { type: "objectKeys" }],
|
|
943
|
+
name: "(?:^\\[class\\]$)|(?:^\\[ngClass\\]$)"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
kind: "attribute",
|
|
947
|
+
match: [{ type: "strings" }, { type: "objectKeys" }],
|
|
948
|
+
name: "^v-bind:class$"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
kind: "attribute",
|
|
952
|
+
match: [{ type: "strings" }, { type: "objectKeys" }],
|
|
953
|
+
name: "^class:list$"
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
kind: "attribute",
|
|
957
|
+
match: [{ type: "objectKeys" }],
|
|
958
|
+
name: "^classList$"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
kind: "callee",
|
|
962
|
+
match: [{ type: "strings" }],
|
|
963
|
+
name: "^cc$"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
kind: "callee",
|
|
967
|
+
match: [{ type: "objectKeys" }],
|
|
968
|
+
name: "^cc$"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
kind: "callee",
|
|
972
|
+
match: [{
|
|
973
|
+
path: "^base$",
|
|
974
|
+
type: "objectValues"
|
|
975
|
+
}],
|
|
976
|
+
name: "^clb$"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
kind: "callee",
|
|
980
|
+
match: [{
|
|
981
|
+
path: "^variants.*$",
|
|
982
|
+
type: "objectValues"
|
|
983
|
+
}],
|
|
984
|
+
name: "^clb$"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
kind: "callee",
|
|
988
|
+
match: [{
|
|
989
|
+
path: "^compoundVariants\\[\\d+\\]\\.classes$",
|
|
990
|
+
type: "objectValues"
|
|
991
|
+
}],
|
|
992
|
+
name: "^clb$"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
kind: "callee",
|
|
996
|
+
match: [{ type: "strings" }],
|
|
997
|
+
name: "^clsx$"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
kind: "callee",
|
|
1001
|
+
match: [{ type: "objectKeys" }],
|
|
1002
|
+
name: "^clsx$"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
kind: "callee",
|
|
1006
|
+
match: [{ type: "strings" }],
|
|
1007
|
+
name: "^cn$"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
kind: "callee",
|
|
1011
|
+
match: [{ type: "objectKeys" }],
|
|
1012
|
+
name: "^cn$"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
kind: "callee",
|
|
1016
|
+
match: [{ type: "strings" }],
|
|
1017
|
+
name: "^cnb$"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
kind: "callee",
|
|
1021
|
+
match: [{ type: "objectKeys" }],
|
|
1022
|
+
name: "^cnb$"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
kind: "callee",
|
|
1026
|
+
match: [{ type: "strings" }],
|
|
1027
|
+
name: "^ctl$"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
kind: "callee",
|
|
1031
|
+
match: [{ type: "strings" }],
|
|
1032
|
+
name: "^cva$"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
kind: "callee",
|
|
1036
|
+
match: [{
|
|
1037
|
+
path: "^variants.*$",
|
|
1038
|
+
type: "objectValues"
|
|
1039
|
+
}],
|
|
1040
|
+
name: "^cva$"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
kind: "callee",
|
|
1044
|
+
match: [{
|
|
1045
|
+
path: "^compoundVariants\\[\\d+\\]\\.(?:className|class)$",
|
|
1046
|
+
type: "objectValues"
|
|
1047
|
+
}],
|
|
1048
|
+
name: "^cva$"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
kind: "callee",
|
|
1052
|
+
match: [{ type: "strings" }],
|
|
1053
|
+
name: "^cx$"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
kind: "callee",
|
|
1057
|
+
match: [{ type: "objectKeys" }],
|
|
1058
|
+
name: "^cx$"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
kind: "callee",
|
|
1062
|
+
match: [{ type: "strings" }],
|
|
1063
|
+
name: "^dcnb$"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
kind: "callee",
|
|
1067
|
+
match: [{ type: "objectKeys" }],
|
|
1068
|
+
name: "^dcnb$"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
kind: "callee",
|
|
1072
|
+
match: [{ type: "objectKeys" }],
|
|
1073
|
+
name: "^objstr$"
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
kind: "callee",
|
|
1077
|
+
match: [{ type: "strings" }],
|
|
1078
|
+
name: "^tv$"
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
kind: "callee",
|
|
1082
|
+
match: [{
|
|
1083
|
+
path: "^variants.*$",
|
|
1084
|
+
type: "objectValues"
|
|
1085
|
+
}],
|
|
1086
|
+
name: "^tv$"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
kind: "callee",
|
|
1090
|
+
match: [{
|
|
1091
|
+
path: "^compoundVariants\\[\\d+\\]\\.(?:className|class).*$",
|
|
1092
|
+
type: "objectValues"
|
|
1093
|
+
}],
|
|
1094
|
+
name: "^tv$"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
kind: "callee",
|
|
1098
|
+
match: [{
|
|
1099
|
+
path: "^base$",
|
|
1100
|
+
type: "objectValues"
|
|
1101
|
+
}],
|
|
1102
|
+
name: "^tv$"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
kind: "callee",
|
|
1106
|
+
match: [{
|
|
1107
|
+
path: "^slots.*$",
|
|
1108
|
+
type: "objectValues"
|
|
1109
|
+
}],
|
|
1110
|
+
name: "^tv$"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
kind: "callee",
|
|
1114
|
+
match: [{
|
|
1115
|
+
path: "^compoundSlots\\[\\d+\\]\\.(?:className|class).*$",
|
|
1116
|
+
type: "objectValues"
|
|
1117
|
+
}],
|
|
1118
|
+
name: "^tv$"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
kind: "callee",
|
|
1122
|
+
match: [{ type: "strings" }],
|
|
1123
|
+
name: "^twJoin$"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
kind: "callee",
|
|
1127
|
+
match: [{ type: "strings" }],
|
|
1128
|
+
name: "^twMerge$"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
kind: "variable",
|
|
1132
|
+
match: [{ type: "strings" }],
|
|
1133
|
+
name: "^classNames?$"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
kind: "variable",
|
|
1137
|
+
match: [{ type: "strings" }],
|
|
1138
|
+
name: "^classes$"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
kind: "variable",
|
|
1142
|
+
match: [{ type: "strings" }],
|
|
1143
|
+
name: "^styles?$"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
kind: "tag",
|
|
1147
|
+
path: "twc(\\.\\w+)?"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
kind: "callee",
|
|
1151
|
+
match: [{ type: "strings" }, {
|
|
1152
|
+
match: [{ type: "strings" }],
|
|
1153
|
+
type: "anonymousFunctionReturn"
|
|
1154
|
+
}],
|
|
1155
|
+
path: "^twc\\.\\w+"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
kind: "tag",
|
|
1159
|
+
path: "twx(\\.\\w+)?"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
kind: "callee",
|
|
1163
|
+
match: [{ type: "strings" }, {
|
|
1164
|
+
match: [{ type: "strings" }],
|
|
1165
|
+
type: "anonymousFunctionReturn"
|
|
1166
|
+
}],
|
|
1167
|
+
path: "^twx\\.\\w+"
|
|
1168
|
+
}
|
|
1169
|
+
];
|
|
1170
|
+
//#endregion
|
|
420
1171
|
//#region src/configs/playwright.ts
|
|
421
1172
|
const playwright = (config) => [{
|
|
422
1173
|
files: config.files,
|
|
423
1174
|
jsPlugins: ["eslint-plugin-playwright"],
|
|
424
1175
|
rules: {
|
|
425
|
-
...
|
|
1176
|
+
...playwrightRecommendedRules,
|
|
426
1177
|
"playwright/expect-expect": ["error", {
|
|
427
1178
|
assertFunctionNames: config.assertFunctionNames ?? [],
|
|
428
1179
|
assertFunctionPatterns: config.assertFunctionPatterns ?? []
|
|
@@ -469,9 +1220,9 @@ const react = () => [{
|
|
|
469
1220
|
specifier: "eslint-plugin-react-hooks"
|
|
470
1221
|
}],
|
|
471
1222
|
rules: {
|
|
472
|
-
...remapRuleNames(
|
|
473
|
-
...
|
|
474
|
-
...remapRuleNames(
|
|
1223
|
+
...remapRuleNames(reactHooksRecommendedLatestRules, "react-hooks", "react-hooks-js"),
|
|
1224
|
+
...reactAllRules,
|
|
1225
|
+
...remapRuleNames(reactDisableConflictReactHooksRules, "react-hooks", "react-hooks-js"),
|
|
475
1226
|
"@eslint-react/immutability": "error",
|
|
476
1227
|
"@eslint-react/refs": "error"
|
|
477
1228
|
}
|
|
@@ -481,7 +1232,7 @@ const react = () => [{
|
|
|
481
1232
|
const regexp = () => [{
|
|
482
1233
|
files: [GLOB_SRC],
|
|
483
1234
|
jsPlugins: ["eslint-plugin-regexp"],
|
|
484
|
-
rules: { ...
|
|
1235
|
+
rules: { ...regexpRecommendedRules }
|
|
485
1236
|
}];
|
|
486
1237
|
//#endregion
|
|
487
1238
|
//#region src/configs/sonarjs.ts
|
|
@@ -489,7 +1240,7 @@ const sonarjs = () => [{
|
|
|
489
1240
|
files: [GLOB_SRC],
|
|
490
1241
|
jsPlugins: ["eslint-plugin-sonarjs"],
|
|
491
1242
|
rules: {
|
|
492
|
-
...
|
|
1243
|
+
...sonarjsRecommendedRules,
|
|
493
1244
|
"sonarjs/no-commented-code": "off",
|
|
494
1245
|
"sonarjs/deprecation": "off",
|
|
495
1246
|
"sonarjs/arguments-order": "off",
|
|
@@ -843,7 +1594,7 @@ const zod = () => [{
|
|
|
843
1594
|
const createSelectors = (names, kind) => names.map((name) => ({
|
|
844
1595
|
name,
|
|
845
1596
|
kind,
|
|
846
|
-
match: [{ type:
|
|
1597
|
+
match: [{ type: "strings" }, { type: "objectValues" }]
|
|
847
1598
|
}));
|
|
848
1599
|
const concatArrays = (target, source) => {
|
|
849
1600
|
if (Array.isArray(target) && Array.isArray(source)) return [...target, ...source];
|
|
@@ -852,6 +1603,7 @@ const defineConfig = ({ config = {}, custom: userConfig = {} } = {}) => {
|
|
|
852
1603
|
const overrides = [
|
|
853
1604
|
...oxc(),
|
|
854
1605
|
...eslint(),
|
|
1606
|
+
...command(),
|
|
855
1607
|
...typescript(),
|
|
856
1608
|
...unicorn(),
|
|
857
1609
|
...promise(),
|
|
@@ -898,9 +1650,9 @@ const defineConfig = ({ config = {}, custom: userConfig = {} } = {}) => {
|
|
|
898
1650
|
detectComponentClasses: false,
|
|
899
1651
|
rootFontSize: 16,
|
|
900
1652
|
selectors: [
|
|
901
|
-
...
|
|
902
|
-
...createSelectors(["classNames", ".+ClassNames"],
|
|
903
|
-
...createSelectors([".+ClassName", ".+ClassNames"],
|
|
1653
|
+
...betterTailwindcssDefaultSelectors,
|
|
1654
|
+
...createSelectors(["classNames", ".+ClassNames"], "attribute"),
|
|
1655
|
+
...createSelectors([".+ClassName", ".+ClassNames"], "variable")
|
|
904
1656
|
]
|
|
905
1657
|
} }
|
|
906
1658
|
}
|