@coderwyd/eslint-config 4.5.0 → 4.6.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/dist/cli.d.ts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ export {};
package/dist/cli.js CHANGED
@@ -10,29 +10,29 @@ import prompts from "prompts";
10
10
  import { execSync } from "node:child_process";
11
11
 
12
12
  //#region package.json
13
- var version = "4.5.0";
13
+ var version = "4.6.1";
14
14
  var devDependencies = {
15
15
  "@antfu/ni": "^25.0.0",
16
- "@eslint-react/eslint-plugin": "^1.52.3",
17
- "@eslint/config-inspector": "^1.1.0",
16
+ "@eslint-react/eslint-plugin": "^1.52.9",
17
+ "@eslint/config-inspector": "^1.2.0",
18
18
  "@types/eslint-config-prettier": "^6.11.3",
19
- "@types/node": "^24.1.0",
19
+ "@types/node": "^24.3.0",
20
20
  "@types/prompts": "^2.4.9",
21
21
  "@types/yargs": "^17.0.33",
22
- "@unocss/eslint-plugin": "^66.3.3",
23
- "bumpp": "^10.2.0",
24
- "eslint": "^9.31.0",
22
+ "@unocss/eslint-plugin": "^66.5.0",
23
+ "bumpp": "^10.2.3",
24
+ "eslint": "^9.34.0",
25
25
  "eslint-plugin-react-hooks": "6.0.0-rc1",
26
26
  "eslint-plugin-react-refresh": "^0.4.20",
27
- "eslint-plugin-svelte": "^3.11.0",
27
+ "eslint-plugin-svelte": "^3.12.0",
28
28
  "eslint-plugin-tailwindcss": "^3.18.2",
29
- "jiti": "^2.5.0",
29
+ "jiti": "^2.5.1",
30
30
  "nano-staged": "^0.8.0",
31
- "simple-git-hooks": "^2.13.0",
32
- "svelte": "^5.36.14",
33
- "svelte-eslint-parser": "^1.3.0",
34
- "tsdown": "^0.13.0",
35
- "typescript": "^5.8.3"
31
+ "simple-git-hooks": "^2.13.1",
32
+ "svelte": "^5.38.6",
33
+ "svelte-eslint-parser": "^1.3.1",
34
+ "tsdown": "^0.14.2",
35
+ "typescript": "^5.9.2"
36
36
  };
37
37
 
38
38
  //#endregion
@@ -181,4 +181,5 @@ const instance = yargs(hideBin(process.argv)).scriptName("@coderwyd/eslint-confi
181
181
  }).showHelpOnFail(false).alias("h", "help").version("version", version).alias("v", "version");
182
182
  instance.help().argv;
183
183
 
184
- //#endregion
184
+ //#endregion
185
+ export { };
package/dist/index.d.ts CHANGED
@@ -2750,7 +2750,7 @@ interface RuleOptions {
2750
2750
  'react/no-nested-components'?: Linter.RuleEntry<[]>;
2751
2751
  /**
2752
2752
  * Disallow nesting lazy component declarations inside other components.
2753
- * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
2753
+ * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
2754
2754
  */
2755
2755
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
2756
2756
  /**
@@ -3549,8 +3549,14 @@ interface RuleOptions {
3549
3549
  /**
3550
3550
  * disallow using navigation (links, goto, pushState, replaceState) without the base path
3551
3551
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
3552
+ * @deprecated
3552
3553
  */
3553
3554
  'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>;
3555
+ /**
3556
+ * disallow using navigation (links, goto, pushState, replaceState) without a resolve()
3557
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/
3558
+ */
3559
+ 'svelte/no-navigation-without-resolve'?: Linter.RuleEntry<SvelteNoNavigationWithoutResolve>;
3554
3560
  /**
3555
3561
  * disallow use of not function in event handler
3556
3562
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
@@ -3849,6 +3855,11 @@ interface RuleOptions {
3849
3855
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
3850
3856
  */
3851
3857
  'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>;
3858
+ /**
3859
+ * enforce hoisted APIs to be on top of the file
3860
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
3861
+ */
3862
+ 'test/hoisted-apis-on-top'?: Linter.RuleEntry<[]>;
3852
3863
  /**
3853
3864
  * enforce a maximum number of expect per test
3854
3865
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -4055,6 +4066,11 @@ interface RuleOptions {
4055
4066
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
4056
4067
  */
4057
4068
  'test/prefer-expect-resolves'?: Linter.RuleEntry<[]>;
4069
+ /**
4070
+ * enforce using `expectTypeOf` instead of `expect(typeof ...)`
4071
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
4072
+ */
4073
+ 'test/prefer-expect-type-of'?: Linter.RuleEntry<[]>;
4058
4074
  /**
4059
4075
  * enforce having hooks in consistent order
4060
4076
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
@@ -5559,7 +5575,7 @@ interface RuleOptions {
5559
5575
  * Order of UnoCSS utilities in class attribute
5560
5576
  * @see https://unocss.dev/integrations/eslint#rules
5561
5577
  */
5562
- 'unocss/order'?: Linter.RuleEntry<[]>;
5578
+ 'unocss/order'?: Linter.RuleEntry<UnocssOrder>;
5563
5579
  /**
5564
5580
  * Order of UnoCSS attributes
5565
5581
  * @see https://unocss.dev/integrations/eslint#rules
@@ -6125,6 +6141,16 @@ interface RuleOptions {
6125
6141
  * @see https://eslint.vuejs.org/rules/no-mutating-props.html
6126
6142
  */
6127
6143
  'vue/no-mutating-props'?: Linter.RuleEntry<VueNoMutatingProps>;
6144
+ /**
6145
+ * Disallow negated conditions in `<template>`
6146
+ * @see https://eslint.vuejs.org/rules/no-negated-condition.html
6147
+ */
6148
+ 'vue/no-negated-condition'?: Linter.RuleEntry<[]>;
6149
+ /**
6150
+ * disallow negated conditions in v-if/v-else
6151
+ * @see https://eslint.vuejs.org/rules/no-negated-v-if-condition.html
6152
+ */
6153
+ 'vue/no-negated-v-if-condition'?: Linter.RuleEntry<[]>;
6128
6154
  /**
6129
6155
  * disallow parsing errors in `<template>`
6130
6156
  * @see https://eslint.vuejs.org/rules/no-parsing-error.html
@@ -6850,6 +6876,7 @@ type AccessorPairs = [] | [{
6850
6876
  getWithoutSet?: boolean;
6851
6877
  setWithoutGet?: boolean;
6852
6878
  enforceForClassMembers?: boolean;
6879
+ enforceForTSTypes?: boolean;
6853
6880
  }];
6854
6881
  // ----- antfu/consistent-chaining -----
6855
6882
  type AntfuConsistentChaining = [] | [{
@@ -7085,7 +7112,9 @@ type GetterReturn = [] | [{
7085
7112
  allowImplicit?: boolean;
7086
7113
  }];
7087
7114
  // ----- grouped-accessor-pairs -----
7088
- type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")];
7115
+ type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
7116
+ enforceForTSTypes?: boolean;
7117
+ }];
7089
7118
  // ----- handle-callback-err -----
7090
7119
  type HandleCallbackErr = [] | [string];
7091
7120
  // ----- id-blacklist -----
@@ -7582,6 +7611,7 @@ type JsdocRequireReturnsType = [] | [{
7582
7611
  }];
7583
7612
  // ----- jsdoc/require-template -----
7584
7613
  type JsdocRequireTemplate = [] | [{
7614
+ exemptedBy?: string[];
7585
7615
  requireSeparateTemplates?: boolean;
7586
7616
  }];
7587
7617
  // ----- jsdoc/require-throws -----
@@ -8644,10 +8674,17 @@ type NoRestrictedExports = [] | [({
8644
8674
  };
8645
8675
  })];
8646
8676
  // ----- no-restricted-globals -----
8647
- type NoRestrictedGlobals = (string | {
8677
+ type NoRestrictedGlobals = ((string | {
8648
8678
  name: string;
8649
8679
  message?: string;
8650
- })[];
8680
+ })[] | [] | [{
8681
+ globals: (string | {
8682
+ name: string;
8683
+ message?: string;
8684
+ })[];
8685
+ checkGlobalObject?: boolean;
8686
+ globalObjects?: string[];
8687
+ }]);
8651
8688
  // ----- no-restricted-imports -----
8652
8689
  type NoRestrictedImports = ((string | {
8653
8690
  name: string;
@@ -8776,6 +8813,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
8776
8813
  caughtErrorsIgnorePattern?: string;
8777
8814
  destructuredArrayIgnorePattern?: string;
8778
8815
  ignoreClassWithStaticInitBlock?: boolean;
8816
+ ignoreUsingDeclarations?: boolean;
8779
8817
  reportUsedIgnorePattern?: boolean;
8780
8818
  })];
8781
8819
  // ----- no-use-before-define -----
@@ -9141,6 +9179,8 @@ type OneVar = [] | [(("always" | "never" | "consecutive") | {
9141
9179
  var?: ("always" | "never" | "consecutive");
9142
9180
  let?: ("always" | "never" | "consecutive");
9143
9181
  const?: ("always" | "never" | "consecutive");
9182
+ using?: ("always" | "never" | "consecutive");
9183
+ awaitUsing?: ("always" | "never" | "consecutive");
9144
9184
  } | {
9145
9185
  initialized?: ("always" | "never" | "consecutive");
9146
9186
  uninitialized?: ("always" | "never" | "consecutive");
@@ -11311,6 +11351,13 @@ type SvelteNoNavigationWithoutBase = [] | [{
11311
11351
  ignorePushState?: boolean;
11312
11352
  ignoreReplaceState?: boolean;
11313
11353
  }];
11354
+ // ----- svelte/no-navigation-without-resolve -----
11355
+ type SvelteNoNavigationWithoutResolve = [] | [{
11356
+ ignoreGoto?: boolean;
11357
+ ignoreLinks?: boolean;
11358
+ ignorePushState?: boolean;
11359
+ ignoreReplaceState?: boolean;
11360
+ }];
11314
11361
  // ----- svelte/no-reactive-reassign -----
11315
11362
  type SvelteNoReactiveReassign = [] | [{
11316
11363
  props?: boolean;
@@ -12759,6 +12806,11 @@ type UnocssEnforceClassCompile = [] | [{
12759
12806
  prefix?: string;
12760
12807
  enableFix?: boolean;
12761
12808
  }];
12809
+ // ----- unocss/order -----
12810
+ type UnocssOrder = [] | [{
12811
+ unoFunctions?: string[];
12812
+ unoVariables?: string[];
12813
+ }];
12762
12814
  // ----- unused-imports/no-unused-imports -----
12763
12815
  type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
12764
12816
  args?: ("all" | "after-used" | "none");
@@ -13511,6 +13563,7 @@ type VueNoDeprecatedRouterLinkTagProp = [] | [{
13511
13563
  // ----- vue/no-deprecated-slot-attribute -----
13512
13564
  type VueNoDeprecatedSlotAttribute = [] | [{
13513
13565
  ignore?: string[];
13566
+ ignoreParents?: string[];
13514
13567
  }];
13515
13568
  // ----- vue/no-dupe-keys -----
13516
13569
  type VueNoDupeKeys = [] | [{
package/dist/index.js CHANGED
@@ -232,7 +232,7 @@ async function imports() {
232
232
  "antfu/import-dedupe": "error",
233
233
  "antfu/no-import-dist": "error",
234
234
  "antfu/no-import-node-modules-by-path": "error",
235
- "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
235
+ "import/consistent-type-specifier-style": ["error", "top-level"],
236
236
  "import/first": "error",
237
237
  "import/newline-after-import": ["error", { count: 1 }],
238
238
  "import/no-duplicates": "error",
@@ -1392,6 +1392,7 @@ function unicorn(options = {}) {
1392
1392
  "unicorn/prefer-array-some": "error",
1393
1393
  "unicorn/prefer-at": "error",
1394
1394
  "unicorn/prefer-blob-reading-methods": "error",
1395
+ "unicorn/prefer-class-fields": "error",
1395
1396
  "unicorn/prefer-date-now": "error",
1396
1397
  "unicorn/prefer-dom-node-append": "error",
1397
1398
  "unicorn/prefer-dom-node-dataset": "error",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderwyd/eslint-config",
3
3
  "type": "module",
4
- "version": "4.5.0",
4
+ "version": "4.6.1",
5
5
  "description": "Donny's ESLint config",
6
6
  "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
7
7
  "license": "MIT",
@@ -71,30 +71,30 @@
71
71
  "dependencies": {
72
72
  "@antfu/install-pkg": "^1.1.0",
73
73
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
74
- "@typescript-eslint/eslint-plugin": "^8.38.0",
75
- "@typescript-eslint/parser": "^8.38.0",
76
- "@vitest/eslint-plugin": "^1.3.4",
74
+ "@typescript-eslint/eslint-plugin": "^8.42.0",
75
+ "@typescript-eslint/parser": "^8.42.0",
76
+ "@vitest/eslint-plugin": "^1.3.7",
77
77
  "eslint-config-flat-gitignore": "^2.1.0",
78
78
  "eslint-config-prettier": "^10.1.8",
79
79
  "eslint-plugin-antfu": "^3.1.1",
80
80
  "eslint-plugin-command": "^3.3.1",
81
- "eslint-plugin-de-morgan": "^1.3.0",
81
+ "eslint-plugin-de-morgan": "^1.3.1",
82
82
  "eslint-plugin-eslint-comments": "^3.2.0",
83
83
  "eslint-plugin-import-lite": "^0.3.0",
84
- "eslint-plugin-jsdoc": "^51.4.1",
84
+ "eslint-plugin-jsdoc": "^54.3.1",
85
85
  "eslint-plugin-jsonc": "^2.20.1",
86
- "eslint-plugin-n": "^17.21.0",
86
+ "eslint-plugin-n": "^17.21.3",
87
87
  "eslint-plugin-no-only-tests": "^3.3.0",
88
88
  "eslint-plugin-perfectionist": "^4.15.0",
89
- "eslint-plugin-regexp": "^2.9.0",
89
+ "eslint-plugin-regexp": "^2.10.0",
90
90
  "eslint-plugin-unicorn": "^60.0.0",
91
- "eslint-plugin-unused-imports": "^4.1.4",
92
- "eslint-plugin-vue": "^10.3.0",
91
+ "eslint-plugin-unused-imports": "^4.2.0",
92
+ "eslint-plugin-vue": "^10.4.0",
93
93
  "eslint-plugin-yml": "^1.18.0",
94
- "eslint-typegen": "^2.2.1",
94
+ "eslint-typegen": "^2.3.0",
95
95
  "globals": "^16.3.0",
96
96
  "jsonc-eslint-parser": "^2.4.0",
97
- "local-pkg": "^1.1.1",
97
+ "local-pkg": "^1.1.2",
98
98
  "parse-gitignore": "^2.0.0",
99
99
  "picocolors": "^1.1.1",
100
100
  "prettier": "^3.6.2",
@@ -105,26 +105,26 @@
105
105
  },
106
106
  "devDependencies": {
107
107
  "@antfu/ni": "^25.0.0",
108
- "@eslint-react/eslint-plugin": "^1.52.3",
109
- "@eslint/config-inspector": "^1.1.0",
108
+ "@eslint-react/eslint-plugin": "^1.52.9",
109
+ "@eslint/config-inspector": "^1.2.0",
110
110
  "@types/eslint-config-prettier": "^6.11.3",
111
- "@types/node": "^24.1.0",
111
+ "@types/node": "^24.3.0",
112
112
  "@types/prompts": "^2.4.9",
113
113
  "@types/yargs": "^17.0.33",
114
- "@unocss/eslint-plugin": "^66.3.3",
115
- "bumpp": "^10.2.0",
116
- "eslint": "^9.31.0",
114
+ "@unocss/eslint-plugin": "^66.5.0",
115
+ "bumpp": "^10.2.3",
116
+ "eslint": "^9.34.0",
117
117
  "eslint-plugin-react-hooks": "6.0.0-rc1",
118
118
  "eslint-plugin-react-refresh": "^0.4.20",
119
- "eslint-plugin-svelte": "^3.11.0",
119
+ "eslint-plugin-svelte": "^3.12.0",
120
120
  "eslint-plugin-tailwindcss": "^3.18.2",
121
- "jiti": "^2.5.0",
121
+ "jiti": "^2.5.1",
122
122
  "nano-staged": "^0.8.0",
123
- "simple-git-hooks": "^2.13.0",
124
- "svelte": "^5.36.14",
125
- "svelte-eslint-parser": "^1.3.0",
126
- "tsdown": "^0.13.0",
127
- "typescript": "^5.8.3"
123
+ "simple-git-hooks": "^2.13.1",
124
+ "svelte": "^5.38.6",
125
+ "svelte-eslint-parser": "^1.3.1",
126
+ "tsdown": "^0.14.2",
127
+ "typescript": "^5.9.2"
128
128
  },
129
129
  "simple-git-hooks": {
130
130
  "pre-commit": "pnpm exec nano-staged"