@adbayb/stack 0.0.0-next-5671759 → 0.0.0-next-c59d48f

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.
@@ -46,11 +46,19 @@ export default tseslint.config(
46
46
  importPlugin.flatConfigs.typescript,
47
47
  {
48
48
  files: ["**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts}"],
49
+ languageOptions: {
50
+ parser: tseslint.parser,
51
+ parserOptions: {
52
+ project: "./tsconfig.json",
53
+ tsconfigRootDir: CWD,
54
+ },
55
+ },
49
56
  plugins: {
50
57
  import: importPlugin,
51
58
  jsdoc: jsdocPlugin,
52
59
  sonarjs: sonarjsPlugin,
53
60
  "sort-keys-custom-order": sortKeysCustomOrderPlugin,
61
+ "@typescript-eslint": tseslint.plugin,
54
62
  },
55
63
  settings: {
56
64
  "import/resolver": {
@@ -76,7 +84,6 @@ export default tseslint.config(
76
84
  "no-debugger": "error",
77
85
  "no-delete-var": "error",
78
86
  "no-dupe-args": "error",
79
- "no-dupe-class-members": "error",
80
87
  "no-dupe-else-if": "error",
81
88
  "no-dupe-keys": "error",
82
89
  "no-duplicate-case": "error",
@@ -92,7 +99,6 @@ export default tseslint.config(
92
99
  "no-import-assign": "error",
93
100
  "no-invalid-regexp": "error",
94
101
  "no-irregular-whitespace": "error",
95
- "no-loss-of-precision": "error",
96
102
  "no-misleading-character-class": "error",
97
103
  "no-new-native-nonconstructor": "error",
98
104
  "no-nonoctal-decimal-escape": "error",
@@ -101,7 +107,6 @@ export default tseslint.config(
101
107
  "no-prototype-builtins": "error",
102
108
  "no-redeclare": "error",
103
109
  "no-regex-spaces": "error",
104
- "no-return-await": "error",
105
110
  "no-self-assign": "error",
106
111
  "no-setter-return": "error",
107
112
  "no-shadow-restricted-names": "error",
@@ -115,7 +120,6 @@ export default tseslint.config(
115
120
  "no-unsafe-optional-chaining": "error",
116
121
  "no-unused-labels": "error",
117
122
  "no-unused-private-class-members": "error",
118
- "no-unused-vars": "error",
119
123
  "no-useless-backreference": "error",
120
124
  "no-useless-catch": "error",
121
125
  "no-useless-escape": "error",
@@ -379,7 +383,6 @@ export default tseslint.config(
379
383
  "sonarjs/no-empty-after-reluctant": "error",
380
384
  "sonarjs/no-empty-alternatives": "error",
381
385
  "sonarjs/no-empty-collection": "error",
382
- "sonarjs/no-empty-function": "error",
383
386
  "sonarjs/no-empty-group": "error",
384
387
  "sonarjs/no-empty-test-file": "error",
385
388
  "sonarjs/no-equals-in-for-termination": "error",
@@ -424,22 +427,18 @@ export default tseslint.config(
424
427
  "sonarjs/no-os-command-from-path": "error",
425
428
  "sonarjs/no-parameter-reassignment": "error",
426
429
  "sonarjs/no-primitive-wrappers": "error",
427
- "sonarjs/no-redeclare": "error",
428
430
  "sonarjs/no-redundant-assignments": "error",
429
431
  "sonarjs/no-redundant-boolean": "error",
430
432
  "sonarjs/no-redundant-jump": "error",
431
- // Breakpoint start from no-reference-error (https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
432
- // Remove redundant rules with TS + import + ESLint
433
433
  "sonarjs/no-referrer-policy": "error",
434
434
  "sonarjs/no-same-argument-assert": "error",
435
- "sonarjs/no-same-line-conditional": "error",
436
435
  "sonarjs/no-selector-parameter": "error",
437
436
  "sonarjs/no-self-compare": "error",
438
437
  "sonarjs/no-self-import": "error",
439
- "sonarjs/no-skipped-test": "error",
440
438
  "sonarjs/no-small-switch": "error",
441
439
  "sonarjs/no-table-as-layout": "error",
442
- "sonarjs/no-throw-literal": "error",
440
+ // Breakpoint start from no-reference-error (https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
441
+ // Remove redundant rules with TS + import + ESLint
443
442
  "sonarjs/no-try-promise": "error",
444
443
  "sonarjs/no-undefined-argument": "error",
445
444
  "sonarjs/no-unenclosed-multiline-block": "error",
@@ -470,10 +469,8 @@ export default tseslint.config(
470
469
  "sonarjs/post-message": "error",
471
470
  "sonarjs/prefer-default-last": "error",
472
471
  "sonarjs/prefer-enum-initializers": "error",
473
- "sonarjs/prefer-for-of": "error",
474
472
  "sonarjs/prefer-function-type": "error",
475
473
  "sonarjs/prefer-namespace-keyword": "error",
476
- "sonarjs/prefer-nullish-coalescing": "error",
477
474
  "sonarjs/prefer-object-spread": "error",
478
475
  "sonarjs/prefer-promise-shorthand": "error",
479
476
  "sonarjs/prefer-single-boolean-return": "error",
@@ -494,15 +491,11 @@ export default tseslint.config(
494
491
  "sonarjs/sonar-block-scoped-var": "error",
495
492
  "sonarjs/sonar-max-params": "error",
496
493
  "sonarjs/sonar-no-control-regex": "error",
497
- "sonarjs/sonar-no-dupe-keys": "error",
498
494
  "sonarjs/sonar-no-empty-character-class": "error",
499
495
  "sonarjs/sonar-no-fallthrough": "error",
500
496
  "sonarjs/sonar-no-invalid-regexp": "error",
501
497
  "sonarjs/sonar-no-misleading-character-class": "error",
502
498
  "sonarjs/sonar-no-regex-spaces": "error",
503
- "sonarjs/sonar-no-unused-vars": "error",
504
- "sonarjs/sonar-prefer-optional-chain": "error",
505
- "sonarjs/sonar-prefer-regexp-exec": "error",
506
499
  "sonarjs/sql-queries": "error",
507
500
  "sonarjs/stable-tests": "error",
508
501
  "sonarjs/stateful-regex": "error",
@@ -513,7 +506,6 @@ export default tseslint.config(
513
506
  "sonarjs/test-check-exception": "error",
514
507
  "sonarjs/todo-tag": "warn",
515
508
  "sonarjs/unnecessary-character-escapes": "error",
516
- "sonarjs/unused-import": "error",
517
509
  "sonarjs/unused-named-groups": "error",
518
510
  "sonarjs/unverified-certificate": "error",
519
511
  "sonarjs/unverified-hostname": "error",
@@ -554,149 +546,7 @@ export default tseslint.config(
554
546
  },
555
547
  ],
556
548
  //#endregion
557
- },
558
- },
559
- {
560
- files: ["**/*.{jsx,tsx}"],
561
- plugins: {
562
- react: reactPlugin,
563
- "react-hooks": reactHooksPlugin,
564
- },
565
- settings: {
566
- react: {
567
- version: "detect",
568
- },
569
- },
570
- rules: {
571
- "react/boolean-prop-naming": [
572
- "error",
573
- { rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+" },
574
- ],
575
- "react-hooks/exhaustive-deps": "warn",
576
- "react-hooks/rules-of-hooks": "error",
577
- "react/button-has-type": "error",
578
- "react/checked-requires-onchange-or-readonly": "error",
579
- "react/display-name": "error",
580
- "react/forbid-component-props": "error",
581
- "react/forward-ref-uses-ref": "error",
582
- "react/hook-use-state": "error",
583
- "react/iframe-missing-sandbox": "error",
584
- "react/jsx-boolean-value": "error",
585
- "react/jsx-fragments": "error",
586
- "react/jsx-handler-names": "error",
587
- "react/jsx-key": "error",
588
- "react/jsx-no-bind": "error",
589
- "react/jsx-no-constructed-context-values": "error",
590
- "react/jsx-no-leaked-render": "error",
591
- "react/jsx-no-script-url": "error",
592
- "react/jsx-no-target-blank": "error",
593
- "react/jsx-no-useless-fragment": "error",
594
- "react/jsx-pascal-case": "error",
595
- "react/jsx-props-no-spread-multi": "error",
596
- "react/jsx-sort-props": "error",
597
- "react/jsx-uses-react": "error",
598
- "react/jsx-uses-vars": "error",
599
- "react/no-access-state-in-setstate": "error",
600
- "react/no-array-index-key": "error",
601
- "react/no-arrow-function-lifecycle": "error",
602
- "react/no-children-prop": "error",
603
- "react/no-danger-with-children": "error",
604
- "react/no-did-mount-set-state": "error",
605
- "react/no-did-update-set-state": "error",
606
- "react/no-direct-mutation-state": "error",
607
- "react/no-find-dom-node": "error",
608
- "react/no-is-mounted": "error",
609
- "react/no-namespace": "error",
610
- "react/no-object-type-as-default-prop": "error",
611
- "react/no-redundant-should-component-update": "error",
612
- "react/no-render-return-value": "error",
613
- "react/no-string-refs": "error",
614
- "react/no-this-in-sfc": "error",
615
- "react/no-typos": "error",
616
- "react/no-unescaped-entities": "error",
617
- "react/no-unsafe": "error",
618
- "react/no-unstable-nested-components": "error",
619
- "react/no-unused-class-component-methods": "error",
620
- "react/no-unused-state": "error",
621
- "react/no-will-update-set-state": "error",
622
- "react/prefer-read-only-props": "error",
623
- "react/prefer-stateless-function": "error",
624
- "react/self-closing-comp": "error",
625
- "react/style-prop-object": "error",
626
- "react/void-dom-elements-no-children": "error",
627
- },
628
- },
629
- {
630
- files: [
631
- "**/test.{js,ts,jsx,tsx,cjs,cts,mjs,mts}",
632
- "**/*.test.{js,ts,jsx,tsx,cjs,cts,mjs,mts}",
633
- ],
634
- plugins: {
635
- "jest-formatting": jestFormattingPlugin,
636
- vitest: vitestPlugin,
637
- },
638
- rules: {
639
- "jest-formatting/padding-around-all": "error",
640
- "vitest/consistent-test-it": [
641
- "error",
642
- { fn: "test", withinDescribe: "test" },
643
- ],
644
- "vitest/expect-expect": "error",
645
- "vitest/max-nested-describe": ["error", { max: 1 }],
646
- "vitest/no-alias-methods": "error",
647
- "vitest/no-commented-out-tests": "error",
648
- "vitest/no-conditional-expect": "error",
649
- "vitest/no-conditional-in-test": "error",
650
- "vitest/no-conditional-tests": "error",
651
- "vitest/no-disabled-tests": "error",
652
- "vitest/no-done-callback": "error",
653
- "vitest/no-duplicate-hooks": "error",
654
- "vitest/no-focused-tests": "error",
655
- "vitest/no-identical-title": "error",
656
- "vitest/no-import-node-test": "error",
657
- "vitest/no-mocks-import": "error",
658
- "vitest/no-standalone-expect": "error",
659
- "vitest/no-test-return-statement": "error",
660
- "vitest/prefer-called-with": "error",
661
- "vitest/prefer-comparison-matcher": "error",
662
- "vitest/prefer-each": "error",
663
- "vitest/prefer-equality-matcher": "error",
664
- "vitest/prefer-hooks-in-order": "error",
665
- "vitest/prefer-hooks-on-top": "error",
666
- "vitest/prefer-lowercase-title": "error",
667
- "vitest/prefer-mock-promise-shorthand": "error",
668
- "vitest/prefer-strict-equal": "error",
669
- "vitest/prefer-to-be": "error",
670
- "vitest/prefer-to-be-object": "error",
671
- "vitest/prefer-to-contain": "error",
672
- "vitest/prefer-to-have-length": "error",
673
- "vitest/prefer-todo": "error",
674
- "vitest/require-hook": "error",
675
- "vitest/require-local-test-context-for-concurrent-snapshots":
676
- "error",
677
- "vitest/require-to-throw-message": "error",
678
- "vitest/require-top-level-describe": "error",
679
- "vitest/valid-describe-callback": "error",
680
- "vitest/valid-expect": "error",
681
- "vitest/valid-title": [
682
- "error",
683
- { mustMatch: { test: ["^should "] } },
684
- ],
685
- },
686
- },
687
- {
688
- files: ["**/*.{ts,tsx,cts,mts}"],
689
- languageOptions: {
690
- parser: tseslint.parser,
691
- parserOptions: {
692
- projectService: true,
693
- tsconfigRootDir: import.meta.dirname,
694
- },
695
- },
696
- plugins: {
697
- "@typescript-eslint": tseslint.plugin,
698
- },
699
- rules: {
549
+ //#region typescript-eslint
700
550
  "@typescript-eslint/adjacent-overload-signatures": "error",
701
551
  // https://www.totaltypescript.com/array-types-in-typescript
702
552
  "@typescript-eslint/array-type": [
@@ -824,42 +674,159 @@ export default tseslint.config(
824
674
  "@typescript-eslint/unbound-method": "error",
825
675
  "@typescript-eslint/no-dupe-class-members": "error",
826
676
  "@typescript-eslint/unified-signatures": "error",
827
- "class-methods-use-this": "off",
828
677
  "@typescript-eslint/no-empty-function": "error",
829
- "default-param-last": "off",
830
678
  "@typescript-eslint/no-empty-object-type": "error",
831
- "dot-notation": "off",
832
679
  "@typescript-eslint/no-implied-eval": "error",
833
- "no-array-constructor": "off",
834
680
  "@typescript-eslint/no-invalid-this": "error",
835
- "no-dupe-class-members": "off",
836
681
  "@typescript-eslint/no-deprecated": "error",
837
- "no-empty-function": "off",
838
682
  "@typescript-eslint/no-loop-func": "error",
839
683
  "@typescript-eslint/no-loss-of-precision": "error",
840
- "no-implied-eval": "off",
841
- "@typescript-eslint/no-redeclare": "error",
842
- "no-invalid-this": "off",
843
684
  "@typescript-eslint/no-shadow": "error",
844
- "no-loop-func": "off",
845
685
  "@typescript-eslint/return-await": "error",
846
686
  "@typescript-eslint/only-throw-error": "error",
847
- "no-loss-of-precision": "off",
848
687
  "@typescript-eslint/require-await": "error",
849
- "no-redeclare": "off",
850
688
  "@typescript-eslint/no-unused-expressions": "error",
851
- "no-return-await": "off",
852
- "no-shadow": "off",
853
689
  "@typescript-eslint/no-unused-vars": [
854
690
  "error",
855
691
  { ignoreRestSiblings: true },
856
692
  ],
857
693
  "@typescript-eslint/no-useless-constructor": "error",
858
- "no-throw-literal": "off",
859
694
  "no-unused-expressions": "off",
860
- "no-unused-vars": "off",
861
695
  "no-useless-constructor": "off",
862
696
  "require-await": "off",
697
+ //#endregion
698
+ },
699
+ },
700
+ {
701
+ files: ["**/*.{js,jsx,cjs,mjs}"],
702
+ ...tseslint.configs.disableTypeChecked,
703
+ },
704
+ {
705
+ files: ["**/*.{jsx,tsx}"],
706
+ plugins: {
707
+ react: reactPlugin,
708
+ "react-hooks": reactHooksPlugin,
709
+ },
710
+ settings: {
711
+ react: {
712
+ version: "detect",
713
+ },
714
+ },
715
+ rules: {
716
+ "react/boolean-prop-naming": [
717
+ "error",
718
+ { rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+" },
719
+ ],
720
+ "react-hooks/exhaustive-deps": "warn",
721
+ "react-hooks/rules-of-hooks": "error",
722
+ "react/button-has-type": "error",
723
+ "react/checked-requires-onchange-or-readonly": "error",
724
+ "react/display-name": "error",
725
+ "react/forbid-component-props": "error",
726
+ "react/forward-ref-uses-ref": "error",
727
+ "react/hook-use-state": "error",
728
+ "react/iframe-missing-sandbox": "error",
729
+ "react/jsx-boolean-value": "error",
730
+ "react/jsx-fragments": "error",
731
+ "react/jsx-handler-names": "error",
732
+ "react/jsx-key": "error",
733
+ "react/jsx-no-bind": "error",
734
+ "react/jsx-no-constructed-context-values": "error",
735
+ "react/jsx-no-leaked-render": "error",
736
+ "react/jsx-no-script-url": "error",
737
+ "react/jsx-no-target-blank": "error",
738
+ "react/jsx-no-useless-fragment": "error",
739
+ "react/jsx-pascal-case": "error",
740
+ "react/jsx-props-no-spread-multi": "error",
741
+ "react/jsx-sort-props": "error",
742
+ "react/jsx-uses-react": "error",
743
+ "react/jsx-uses-vars": "error",
744
+ "react/no-access-state-in-setstate": "error",
745
+ "react/no-array-index-key": "error",
746
+ "react/no-arrow-function-lifecycle": "error",
747
+ "react/no-children-prop": "error",
748
+ "react/no-danger-with-children": "error",
749
+ "react/no-did-mount-set-state": "error",
750
+ "react/no-did-update-set-state": "error",
751
+ "react/no-direct-mutation-state": "error",
752
+ "react/no-find-dom-node": "error",
753
+ "react/no-is-mounted": "error",
754
+ "react/no-namespace": "error",
755
+ "react/no-object-type-as-default-prop": "error",
756
+ "react/no-redundant-should-component-update": "error",
757
+ "react/no-render-return-value": "error",
758
+ "react/no-string-refs": "error",
759
+ "react/no-this-in-sfc": "error",
760
+ "react/no-typos": "error",
761
+ "react/no-unescaped-entities": "error",
762
+ "react/no-unsafe": "error",
763
+ "react/no-unstable-nested-components": "error",
764
+ "react/no-unused-class-component-methods": "error",
765
+ "react/no-unused-state": "error",
766
+ "react/no-will-update-set-state": "error",
767
+ "react/prefer-read-only-props": "error",
768
+ "react/prefer-stateless-function": "error",
769
+ "react/self-closing-comp": "error",
770
+ "react/style-prop-object": "error",
771
+ "react/void-dom-elements-no-children": "error",
772
+ },
773
+ },
774
+ {
775
+ files: [
776
+ "**/test.{js,ts,jsx,tsx,cjs,cts,mjs,mts}",
777
+ "**/*.test.{js,ts,jsx,tsx,cjs,cts,mjs,mts}",
778
+ ],
779
+ plugins: {
780
+ "jest-formatting": jestFormattingPlugin,
781
+ vitest: vitestPlugin,
782
+ },
783
+ rules: {
784
+ "jest-formatting/padding-around-all": "error",
785
+ "vitest/consistent-test-it": [
786
+ "error",
787
+ { fn: "test", withinDescribe: "test" },
788
+ ],
789
+ "vitest/expect-expect": "error",
790
+ "vitest/max-nested-describe": ["error", { max: 1 }],
791
+ "vitest/no-alias-methods": "error",
792
+ "vitest/no-commented-out-tests": "error",
793
+ "vitest/no-conditional-expect": "error",
794
+ "vitest/no-conditional-in-test": "error",
795
+ "vitest/no-conditional-tests": "error",
796
+ "vitest/no-disabled-tests": "error",
797
+ "vitest/no-done-callback": "error",
798
+ "vitest/no-duplicate-hooks": "error",
799
+ "vitest/no-focused-tests": "error",
800
+ "vitest/no-identical-title": "error",
801
+ "vitest/no-import-node-test": "error",
802
+ "vitest/no-mocks-import": "error",
803
+ "vitest/no-standalone-expect": "error",
804
+ "vitest/no-test-return-statement": "error",
805
+ "vitest/prefer-called-with": "error",
806
+ "vitest/prefer-comparison-matcher": "error",
807
+ "vitest/prefer-each": "error",
808
+ "vitest/prefer-equality-matcher": "error",
809
+ "vitest/prefer-hooks-in-order": "error",
810
+ "vitest/prefer-hooks-on-top": "error",
811
+ "vitest/prefer-lowercase-title": "error",
812
+ "vitest/prefer-mock-promise-shorthand": "error",
813
+ "vitest/prefer-strict-equal": "error",
814
+ "vitest/prefer-to-be": "error",
815
+ "vitest/prefer-to-be-object": "error",
816
+ "vitest/prefer-to-contain": "error",
817
+ "vitest/prefer-to-have-length": "error",
818
+ "vitest/prefer-todo": "error",
819
+ "vitest/require-hook": "error",
820
+ "vitest/require-local-test-context-for-concurrent-snapshots":
821
+ "error",
822
+ "vitest/require-to-throw-message": "error",
823
+ "vitest/require-top-level-describe": "error",
824
+ "vitest/valid-describe-callback": "error",
825
+ "vitest/valid-expect": "error",
826
+ "vitest/valid-title": [
827
+ "error",
828
+ { mustMatch: { test: ["^should "] } },
829
+ ],
863
830
  },
864
831
  },
865
832
  ...new FlatCompat().extends("plugin:mdx/recommended").map((config) => ({
package/dist/index.mjs CHANGED
@@ -327,7 +327,7 @@ const PRESERVE_FILES = [
327
327
  ];
328
328
 
329
329
  var name = "@adbayb/stack";
330
- var version = "0.0.0-next-5671759";
330
+ var version = "0.0.0-next-c59d48f";
331
331
  var description = "My opinionated JavaScript-based toolchain";
332
332
  var publishConfig = {
333
333
  access: "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "0.0.0-next-5671759",
3
+ "version": "0.0.0-next-c59d48f",
4
4
  "description": "My opinionated JavaScript-based toolchain",
5
5
  "publishConfig": {
6
6
  "access": "public"