@jsse/eslint-config 0.1.10 → 0.1.12

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/dist/cli.cjs CHANGED
@@ -617,7 +617,7 @@ var CAC = class extends import_events.EventEmitter {
617
617
  var cac = (name = "") => new CAC(name);
618
618
 
619
619
  // package.json
620
- var version = "0.1.10";
620
+ var version = "0.1.12";
621
621
 
622
622
  // src/cli.ts
623
623
  var cli = cac("jsselint");
package/dist/cli.js CHANGED
@@ -593,7 +593,7 @@ var CAC = class extends EventEmitter {
593
593
  var cac = (name = "") => new CAC(name);
594
594
 
595
595
  // package.json
596
- var version = "0.1.10";
596
+ var version = "0.1.12";
597
597
 
598
598
  // src/cli.ts
599
599
  var cli = cac("jsselint");
package/dist/index.cjs CHANGED
@@ -10148,6 +10148,11 @@ function typescriptRulesTypeAware() {
10148
10148
  "@typescript-eslint/restrict-plus-operands": "error",
10149
10149
  "@typescript-eslint/restrict-template-expressions": "error",
10150
10150
  "@typescript-eslint/unbound-method": "error",
10151
+ "@typescript-eslint/no-redundant-type-constituents": "warn",
10152
+ "@typescript-eslint/require-array-sort-compare": [
10153
+ "error",
10154
+ { ignoreStringArrays: true }
10155
+ ],
10151
10156
  "@typescript-eslint/naming-convention": [
10152
10157
  "error",
10153
10158
  {
@@ -10528,7 +10533,15 @@ function typescriptRulesTypeOblivious() {
10528
10533
  "space-before-blocks": "off",
10529
10534
  "@typescript-eslint/space-before-blocks": ["error", "always"],
10530
10535
  "no-undef": "off",
10531
- "no-duplicate-imports": "off"
10536
+ "no-duplicate-imports": "off",
10537
+ "@typescript-eslint/method-signature-style": "warn"
10538
+ /**
10539
+ * @todo
10540
+ */
10541
+ // "@typescript-eslint/explicit-function-return-type": [
10542
+ // "warn",
10543
+ // { allowExpressions: true, allowTypedFunctionExpressions: true },
10544
+ // ],
10532
10545
  };
10533
10546
  }
10534
10547
  function typescriptRules(props) {
@@ -10776,7 +10789,7 @@ function eslintConfigPrettierRules() {
10776
10789
  var prettier = async () => {
10777
10790
  return [
10778
10791
  {
10779
- name: "jsse:prettier",
10792
+ name: "jsse:prettier:config",
10780
10793
  rules: eslintConfigPrettierRules()
10781
10794
  }
10782
10795
  ];
@@ -10890,6 +10903,7 @@ function reactRules() {
10890
10903
  "react/jsx-no-target-blank": [
10891
10904
  "error",
10892
10905
  {
10906
+ allowReferrer: true,
10893
10907
  forms: true,
10894
10908
  warnOnSpreadAttributes: true
10895
10909
  }
@@ -10955,11 +10969,13 @@ function reactRules() {
10955
10969
  "react/no-typos": "error",
10956
10970
  "react/no-unescaped-entities": "error",
10957
10971
  "react/no-unsafe": "error",
10972
+ "react/no-unstable-nested-components": "error",
10958
10973
  // "react/no-unused-prop-types": "error",
10959
10974
  "react/no-unused-state": "error",
10960
10975
  "react/prefer-read-only-props": "error",
10961
10976
  // "react/prop-types": "error",
10962
10977
  "react/react-in-jsx-scope": "off",
10978
+ // not needed anymore!
10963
10979
  "react/require-default-props": [
10964
10980
  "error",
10965
10981
  {
@@ -11451,7 +11467,7 @@ var typescript = async (options) => {
11451
11467
  },
11452
11468
  {
11453
11469
  files: ["**/*.d.ts"],
11454
- name: "jsse:typescript:dts-overrides",
11470
+ name: "jsse:typescript:disables:dts",
11455
11471
  rules: {
11456
11472
  "eslint-comments/no-unlimited-disable": "off",
11457
11473
  "import/no-duplicates": "off",
@@ -11461,8 +11477,9 @@ var typescript = async (options) => {
11461
11477
  },
11462
11478
  {
11463
11479
  files: ["**/*.{test,spec}.ts?(x)"],
11464
- name: "jsse:typescript:tests-overrides",
11480
+ name: "jsse:typescript:disable:test",
11465
11481
  rules: {
11482
+ "@typescript-eslint/no-unused-expressions": "off",
11466
11483
  "no-unused-expressions": "off"
11467
11484
  }
11468
11485
  },
@@ -11608,6 +11625,7 @@ var vitest = async (options = {}) => {
11608
11625
  "error",
11609
11626
  { fn: "test", withinDescribe: "test" }
11610
11627
  ],
11628
+ "vitest/no-duplicate-hooks": "error",
11611
11629
  "vitest/no-identical-title": "error",
11612
11630
  "vitest/prefer-hooks-in-order": "error",
11613
11631
  "vitest/prefer-lowercase-title": "error",
package/dist/index.d.cts CHANGED
@@ -9545,6 +9545,11 @@ interface PerfectionistRuleOptions {
9545
9545
  * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-interfaces
9546
9546
  */
9547
9547
  "perfectionist/sort-interfaces"?: Linter.RuleEntry<PerfectionistSortInterfaces>;
9548
+ /**
9549
+ * enforce sorted intersection types
9550
+ * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-intersection-types
9551
+ */
9552
+ "perfectionist/sort-intersection-types"?: Linter.RuleEntry<PerfectionistSortIntersectionTypes>;
9548
9553
  /**
9549
9554
  * enforce sorted JSX props
9550
9555
  * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
@@ -9696,6 +9701,16 @@ type PerfectionistSortInterfaces =
9696
9701
  "partition-by-new-line"?: boolean;
9697
9702
  },
9698
9703
  ];
9704
+ // ----- perfectionist/sort-intersection-types -----
9705
+ type PerfectionistSortIntersectionTypes =
9706
+ | []
9707
+ | [
9708
+ {
9709
+ type?: "alphabetical" | "natural" | "line-length";
9710
+ order?: "asc" | "desc";
9711
+ "ignore-case"?: boolean;
9712
+ },
9713
+ ];
9699
9714
  // ----- perfectionist/sort-jsx-props -----
9700
9715
  type PerfectionistSortJsxProps =
9701
9716
  | []
@@ -13390,7 +13405,7 @@ interface VitestRuleOptions {
13390
13405
  * disallow focused tests
13391
13406
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
13392
13407
  */
13393
- "vitest/no-focused-tests"?: Linter.RuleEntry<[]>;
13408
+ "vitest/no-focused-tests"?: Linter.RuleEntry<VitestNoFocusedTests>;
13394
13409
  /**
13395
13410
  * disallow setup and teardown hooks
13396
13411
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
@@ -13629,6 +13644,14 @@ type VitestMaxNestedDescribe =
13629
13644
  max?: number;
13630
13645
  },
13631
13646
  ];
13647
+ // ----- vitest/no-focused-tests -----
13648
+ type VitestNoFocusedTests =
13649
+ | []
13650
+ | [
13651
+ {
13652
+ fixable?: boolean;
13653
+ },
13654
+ ];
13632
13655
  // ----- vitest/no-hooks -----
13633
13656
  type VitestNoHooks =
13634
13657
  | []
@@ -22197,7 +22220,7 @@ declare function importPluginMarkdown(): Promise<{
22197
22220
  }>;
22198
22221
  declare function importPluginJsdoc(): Promise<{
22199
22222
  pluginJsdoc: eslint.ESLint.Plugin & {
22200
- configs: Record<"recommended" | "recommended-error" | "recommended-typescript" | "recommended-typescript-error" | "recommended-typescript-flavor" | "recommended-typescript-flavor-error" | "flat/recommended" | "flat/recommended-error" | "flat/recommended-typescript" | "flat/recommended-typescript-error" | "flat/recommended-typescript-flavor" | "flat/recommended-typescript-flavor-error", eslint.Linter.FlatConfig>;
22223
+ configs: Record<"recommended" | "recommended-error" | "recommended-typescript" | "recommended-typescript-error" | "recommended-typescript-flavor" | "recommended-typescript-flavor-error" | "flat/recommended" | "flat/recommended-error" | "flat/recommended-typescript" | "flat/recommended-typescript-error" | "flat/recommended-typescript-flavor" | "flat/recommended-typescript-flavor-error", eslint.Linter.FlatConfig<eslint.Linter.RulesRecord>>;
22201
22224
  };
22202
22225
  }>;
22203
22226
  declare function importPluginStylistic(): Promise<{
package/dist/index.d.ts CHANGED
@@ -9545,6 +9545,11 @@ interface PerfectionistRuleOptions {
9545
9545
  * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-interfaces
9546
9546
  */
9547
9547
  "perfectionist/sort-interfaces"?: Linter.RuleEntry<PerfectionistSortInterfaces>;
9548
+ /**
9549
+ * enforce sorted intersection types
9550
+ * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-intersection-types
9551
+ */
9552
+ "perfectionist/sort-intersection-types"?: Linter.RuleEntry<PerfectionistSortIntersectionTypes>;
9548
9553
  /**
9549
9554
  * enforce sorted JSX props
9550
9555
  * @see https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
@@ -9696,6 +9701,16 @@ type PerfectionistSortInterfaces =
9696
9701
  "partition-by-new-line"?: boolean;
9697
9702
  },
9698
9703
  ];
9704
+ // ----- perfectionist/sort-intersection-types -----
9705
+ type PerfectionistSortIntersectionTypes =
9706
+ | []
9707
+ | [
9708
+ {
9709
+ type?: "alphabetical" | "natural" | "line-length";
9710
+ order?: "asc" | "desc";
9711
+ "ignore-case"?: boolean;
9712
+ },
9713
+ ];
9699
9714
  // ----- perfectionist/sort-jsx-props -----
9700
9715
  type PerfectionistSortJsxProps =
9701
9716
  | []
@@ -13390,7 +13405,7 @@ interface VitestRuleOptions {
13390
13405
  * disallow focused tests
13391
13406
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
13392
13407
  */
13393
- "vitest/no-focused-tests"?: Linter.RuleEntry<[]>;
13408
+ "vitest/no-focused-tests"?: Linter.RuleEntry<VitestNoFocusedTests>;
13394
13409
  /**
13395
13410
  * disallow setup and teardown hooks
13396
13411
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
@@ -13629,6 +13644,14 @@ type VitestMaxNestedDescribe =
13629
13644
  max?: number;
13630
13645
  },
13631
13646
  ];
13647
+ // ----- vitest/no-focused-tests -----
13648
+ type VitestNoFocusedTests =
13649
+ | []
13650
+ | [
13651
+ {
13652
+ fixable?: boolean;
13653
+ },
13654
+ ];
13632
13655
  // ----- vitest/no-hooks -----
13633
13656
  type VitestNoHooks =
13634
13657
  | []
@@ -22197,7 +22220,7 @@ declare function importPluginMarkdown(): Promise<{
22197
22220
  }>;
22198
22221
  declare function importPluginJsdoc(): Promise<{
22199
22222
  pluginJsdoc: eslint.ESLint.Plugin & {
22200
- configs: Record<"recommended" | "recommended-error" | "recommended-typescript" | "recommended-typescript-error" | "recommended-typescript-flavor" | "recommended-typescript-flavor-error" | "flat/recommended" | "flat/recommended-error" | "flat/recommended-typescript" | "flat/recommended-typescript-error" | "flat/recommended-typescript-flavor" | "flat/recommended-typescript-flavor-error", eslint.Linter.FlatConfig>;
22223
+ configs: Record<"recommended" | "recommended-error" | "recommended-typescript" | "recommended-typescript-error" | "recommended-typescript-flavor" | "recommended-typescript-flavor-error" | "flat/recommended" | "flat/recommended-error" | "flat/recommended-typescript" | "flat/recommended-typescript-error" | "flat/recommended-typescript-flavor" | "flat/recommended-typescript-flavor-error", eslint.Linter.FlatConfig<eslint.Linter.RulesRecord>>;
22201
22224
  };
22202
22225
  }>;
22203
22226
  declare function importPluginStylistic(): Promise<{
package/dist/index.js CHANGED
@@ -10081,6 +10081,11 @@ function typescriptRulesTypeAware() {
10081
10081
  "@typescript-eslint/restrict-plus-operands": "error",
10082
10082
  "@typescript-eslint/restrict-template-expressions": "error",
10083
10083
  "@typescript-eslint/unbound-method": "error",
10084
+ "@typescript-eslint/no-redundant-type-constituents": "warn",
10085
+ "@typescript-eslint/require-array-sort-compare": [
10086
+ "error",
10087
+ { ignoreStringArrays: true }
10088
+ ],
10084
10089
  "@typescript-eslint/naming-convention": [
10085
10090
  "error",
10086
10091
  {
@@ -10461,7 +10466,15 @@ function typescriptRulesTypeOblivious() {
10461
10466
  "space-before-blocks": "off",
10462
10467
  "@typescript-eslint/space-before-blocks": ["error", "always"],
10463
10468
  "no-undef": "off",
10464
- "no-duplicate-imports": "off"
10469
+ "no-duplicate-imports": "off",
10470
+ "@typescript-eslint/method-signature-style": "warn"
10471
+ /**
10472
+ * @todo
10473
+ */
10474
+ // "@typescript-eslint/explicit-function-return-type": [
10475
+ // "warn",
10476
+ // { allowExpressions: true, allowTypedFunctionExpressions: true },
10477
+ // ],
10465
10478
  };
10466
10479
  }
10467
10480
  function typescriptRules(props) {
@@ -10709,7 +10722,7 @@ function eslintConfigPrettierRules() {
10709
10722
  var prettier = async () => {
10710
10723
  return [
10711
10724
  {
10712
- name: "jsse:prettier",
10725
+ name: "jsse:prettier:config",
10713
10726
  rules: eslintConfigPrettierRules()
10714
10727
  }
10715
10728
  ];
@@ -10823,6 +10836,7 @@ function reactRules() {
10823
10836
  "react/jsx-no-target-blank": [
10824
10837
  "error",
10825
10838
  {
10839
+ allowReferrer: true,
10826
10840
  forms: true,
10827
10841
  warnOnSpreadAttributes: true
10828
10842
  }
@@ -10888,11 +10902,13 @@ function reactRules() {
10888
10902
  "react/no-typos": "error",
10889
10903
  "react/no-unescaped-entities": "error",
10890
10904
  "react/no-unsafe": "error",
10905
+ "react/no-unstable-nested-components": "error",
10891
10906
  // "react/no-unused-prop-types": "error",
10892
10907
  "react/no-unused-state": "error",
10893
10908
  "react/prefer-read-only-props": "error",
10894
10909
  // "react/prop-types": "error",
10895
10910
  "react/react-in-jsx-scope": "off",
10911
+ // not needed anymore!
10896
10912
  "react/require-default-props": [
10897
10913
  "error",
10898
10914
  {
@@ -11384,7 +11400,7 @@ var typescript = async (options) => {
11384
11400
  },
11385
11401
  {
11386
11402
  files: ["**/*.d.ts"],
11387
- name: "jsse:typescript:dts-overrides",
11403
+ name: "jsse:typescript:disables:dts",
11388
11404
  rules: {
11389
11405
  "eslint-comments/no-unlimited-disable": "off",
11390
11406
  "import/no-duplicates": "off",
@@ -11394,8 +11410,9 @@ var typescript = async (options) => {
11394
11410
  },
11395
11411
  {
11396
11412
  files: ["**/*.{test,spec}.ts?(x)"],
11397
- name: "jsse:typescript:tests-overrides",
11413
+ name: "jsse:typescript:disable:test",
11398
11414
  rules: {
11415
+ "@typescript-eslint/no-unused-expressions": "off",
11399
11416
  "no-unused-expressions": "off"
11400
11417
  }
11401
11418
  },
@@ -11541,6 +11558,7 @@ var vitest = async (options = {}) => {
11541
11558
  "error",
11542
11559
  { fn: "test", withinDescribe: "test" }
11543
11560
  ],
11561
+ "vitest/no-duplicate-hooks": "error",
11544
11562
  "vitest/no-identical-title": "error",
11545
11563
  "vitest/prefer-hooks-in-order": "error",
11546
11564
  "vitest/prefer-lowercase-title": "error",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.1.10",
4
+ "version": "0.1.12",
5
5
  "packageManager": "pnpm@8.15.4",
6
6
  "description": "jsse eslint config",
7
7
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@eslint/js": "~8.57.0",
64
- "@stylistic/eslint-plugin": "1.7.0",
64
+ "@stylistic/eslint-plugin": "1.7.2",
65
65
  "@typescript-eslint/eslint-plugin": "^7.6.0",
66
66
  "@typescript-eslint/parser": "^7.6.0",
67
67
  "eslint-config-flat-gitignore": "^0.1.5",
@@ -70,7 +70,7 @@
70
70
  "eslint-plugin-eslint-comments": "^3.2.0",
71
71
  "eslint-plugin-import-x": "^0.5.0",
72
72
  "eslint-plugin-jsdoc": "^48.2.3",
73
- "eslint-plugin-jsonc": "^2.15.0",
73
+ "eslint-plugin-jsonc": "^2.15.1",
74
74
  "eslint-plugin-markdown": "^4.0.1",
75
75
  "eslint-plugin-n": "^17.2.0",
76
76
  "eslint-plugin-no-only-tests": "^3.1.0",
@@ -82,7 +82,7 @@
82
82
  "eslint-plugin-toml": "^0.11.0",
83
83
  "eslint-plugin-unicorn": "^52.0.0",
84
84
  "eslint-plugin-unused-imports": "^3.1.0",
85
- "eslint-plugin-vitest": "0.5.1",
85
+ "eslint-plugin-vitest": "0.5.3",
86
86
  "eslint-plugin-yml": "^1.14.0",
87
87
  "jsonc-eslint-parser": "^2.4.0",
88
88
  "toml-eslint-parser": "^0.9.3",
@@ -95,14 +95,14 @@
95
95
  "devDependencies": {
96
96
  "@antfu/ni": "^0.21.12",
97
97
  "@jsse/prettier-config": "^0.1.0",
98
- "@types/eslint": "^8.56.7",
98
+ "@types/eslint": "^8.56.9",
99
99
  "@types/eslint__js": "~8.42.3",
100
100
  "@types/fs-extra": "^11.0.4",
101
101
  "@types/node": "^20.12.7",
102
102
  "bumpp": "^9.4.0",
103
103
  "cac": "^6.7.14",
104
104
  "eslint": "^8.57.0",
105
- "eslint-flat-config-utils": "^0.2.1",
105
+ "eslint-flat-config-utils": "^0.2.2",
106
106
  "eslint-typegen": "^0.2.2",
107
107
  "execa": "~8.0.1",
108
108
  "fast-glob": "^3.3.2",
@@ -115,7 +115,7 @@
115
115
  "tsup": "^8.0.2",
116
116
  "tsx": "^4.7.2",
117
117
  "typescript": "~5.4.5",
118
- "vitest": "^1.4.0"
118
+ "vitest": "^1.5.0"
119
119
  },
120
120
  "prettier": "@jsse/prettier-config",
121
121
  "scripts": {