@antfu/eslint-config 2.22.2 → 2.22.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 CHANGED
@@ -26,7 +26,7 @@
26
26
  We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config with one command.
27
27
 
28
28
  ```bash
29
- npx @antfu/eslint-config@latest
29
+ pnpm dlx @antfu/eslint-config@latest
30
30
  ```
31
31
 
32
32
  ### Manual Install
package/dist/cli.cjs CHANGED
@@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
48
48
  var package_default = {
49
49
  name: "@antfu/eslint-config",
50
50
  type: "module",
51
- version: "2.22.2",
51
+ version: "2.22.4",
52
52
  packageManager: "pnpm@9.5.0",
53
53
  description: "Anthony's ESLint config",
54
54
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -148,7 +148,7 @@ var package_default = {
148
148
  "@stylistic/eslint-plugin": "^2.6.0-beta.0",
149
149
  "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
150
150
  "@typescript-eslint/parser": "8.0.0-alpha.40",
151
- "eslint-config-flat-gitignore": "^0.1.7",
151
+ "eslint-config-flat-gitignore": "^0.1.8",
152
152
  "eslint-flat-config-utils": "^0.2.5",
153
153
  "eslint-merge-processors": "^0.1.0",
154
154
  "eslint-plugin-antfu": "^2.3.4",
@@ -182,7 +182,7 @@ var package_default = {
182
182
  devDependencies: {
183
183
  "@antfu/eslint-config": "workspace:*",
184
184
  "@antfu/ni": "^0.22.0",
185
- "@eslint-react/eslint-plugin": "^1.5.25",
185
+ "@eslint-react/eslint-plugin": "^1.5.26",
186
186
  "@eslint/config-inspector": "^0.5.1",
187
187
  "@prettier/plugin-xml": "^3.4.1",
188
188
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
@@ -191,7 +191,7 @@ var package_default = {
191
191
  "@types/node": "^20.14.10",
192
192
  "@types/prompts": "^2.4.9",
193
193
  "@types/yargs": "^17.0.32",
194
- "@unocss/eslint-plugin": "^0.61.3",
194
+ "@unocss/eslint-plugin": "^0.61.4",
195
195
  "astro-eslint-parser": "^1.0.2",
196
196
  bumpp: "^9.4.1",
197
197
  eslint: "npm:eslint-ts-patch@9.5.0-0",
@@ -217,7 +217,7 @@ var package_default = {
217
217
  tsup: "^8.1.0",
218
218
  tsx: "^4.16.2",
219
219
  typescript: "^5.5.3",
220
- vitest: "^2.0.2",
220
+ vitest: "^2.0.3",
221
221
  vue: "^3.4.31"
222
222
  },
223
223
  resolutions: {
package/dist/cli.js CHANGED
@@ -19,7 +19,7 @@ import c from "picocolors";
19
19
  var package_default = {
20
20
  name: "@antfu/eslint-config",
21
21
  type: "module",
22
- version: "2.22.2",
22
+ version: "2.22.4",
23
23
  packageManager: "pnpm@9.5.0",
24
24
  description: "Anthony's ESLint config",
25
25
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -119,7 +119,7 @@ var package_default = {
119
119
  "@stylistic/eslint-plugin": "^2.6.0-beta.0",
120
120
  "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
121
121
  "@typescript-eslint/parser": "8.0.0-alpha.40",
122
- "eslint-config-flat-gitignore": "^0.1.7",
122
+ "eslint-config-flat-gitignore": "^0.1.8",
123
123
  "eslint-flat-config-utils": "^0.2.5",
124
124
  "eslint-merge-processors": "^0.1.0",
125
125
  "eslint-plugin-antfu": "^2.3.4",
@@ -153,7 +153,7 @@ var package_default = {
153
153
  devDependencies: {
154
154
  "@antfu/eslint-config": "workspace:*",
155
155
  "@antfu/ni": "^0.22.0",
156
- "@eslint-react/eslint-plugin": "^1.5.25",
156
+ "@eslint-react/eslint-plugin": "^1.5.26",
157
157
  "@eslint/config-inspector": "^0.5.1",
158
158
  "@prettier/plugin-xml": "^3.4.1",
159
159
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
@@ -162,7 +162,7 @@ var package_default = {
162
162
  "@types/node": "^20.14.10",
163
163
  "@types/prompts": "^2.4.9",
164
164
  "@types/yargs": "^17.0.32",
165
- "@unocss/eslint-plugin": "^0.61.3",
165
+ "@unocss/eslint-plugin": "^0.61.4",
166
166
  "astro-eslint-parser": "^1.0.2",
167
167
  bumpp: "^9.4.1",
168
168
  eslint: "npm:eslint-ts-patch@9.5.0-0",
@@ -188,7 +188,7 @@ var package_default = {
188
188
  tsup: "^8.1.0",
189
189
  tsx: "^4.16.2",
190
190
  typescript: "^5.5.3",
191
- vitest: "^2.0.2",
191
+ vitest: "^2.0.3",
192
192
  vue: "^3.4.31"
193
193
  },
194
194
  resolutions: {
package/dist/index.cjs CHANGED
@@ -171,6 +171,7 @@ var GLOB_EXCLUDE = [
171
171
  "**/.vitepress/cache",
172
172
  "**/.nuxt",
173
173
  "**/.next",
174
+ "**/.svelte-kit",
174
175
  "**/.vercel",
175
176
  "**/.changeset",
176
177
  "**/.idea",
@@ -1873,7 +1874,7 @@ async function typescript(options = {}) {
1873
1874
  `${GLOB_MARKDOWN}/**`,
1874
1875
  GLOB_ASTRO_TS
1875
1876
  ];
1876
- const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
1877
+ const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
1877
1878
  const isTypeAware = !!tsconfigPath;
1878
1879
  const typeAwareRules = {
1879
1880
  "dot-notation": "off",
package/dist/index.d.cts CHANGED
@@ -2940,6 +2940,16 @@ interface RuleOptions {
2940
2940
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-ensure-use-memo-has-non-empty-deps
2941
2941
  */
2942
2942
  'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
2943
+ /**
2944
+ * disallow direct calls to the 'set' function of 'useState' in 'useEffect'
2945
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
2946
+ */
2947
+ 'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
2948
+ /**
2949
+ * disallow direct calls to the 'set' function of 'useState' in 'useLayoutEffect'
2950
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
2951
+ */
2952
+ 'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
2943
2953
  /**
2944
2954
  * disallow function calls in 'useState' that aren't wrapped in an initializer function
2945
2955
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
@@ -14867,7 +14877,7 @@ interface OptionsTypeScriptWithTypes {
14867
14877
  * When this options is provided, type aware rules will be enabled.
14868
14878
  * @see https://typescript-eslint.io/linting/typed-linting/
14869
14879
  */
14870
- tsconfigPath?: string | string[];
14880
+ tsconfigPath?: string;
14871
14881
  }
14872
14882
  interface OptionsHasTypeScript {
14873
14883
  typescript?: boolean;
package/dist/index.d.ts CHANGED
@@ -2940,6 +2940,16 @@ interface RuleOptions {
2940
2940
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-ensure-use-memo-has-non-empty-deps
2941
2941
  */
2942
2942
  'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
2943
+ /**
2944
+ * disallow direct calls to the 'set' function of 'useState' in 'useEffect'
2945
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
2946
+ */
2947
+ 'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
2948
+ /**
2949
+ * disallow direct calls to the 'set' function of 'useState' in 'useLayoutEffect'
2950
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
2951
+ */
2952
+ 'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
2943
2953
  /**
2944
2954
  * disallow function calls in 'useState' that aren't wrapped in an initializer function
2945
2955
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
@@ -14867,7 +14877,7 @@ interface OptionsTypeScriptWithTypes {
14867
14877
  * When this options is provided, type aware rules will be enabled.
14868
14878
  * @see https://typescript-eslint.io/linting/typed-linting/
14869
14879
  */
14870
- tsconfigPath?: string | string[];
14880
+ tsconfigPath?: string;
14871
14881
  }
14872
14882
  interface OptionsHasTypeScript {
14873
14883
  typescript?: boolean;
package/dist/index.js CHANGED
@@ -67,6 +67,7 @@ var GLOB_EXCLUDE = [
67
67
  "**/.vitepress/cache",
68
68
  "**/.nuxt",
69
69
  "**/.next",
70
+ "**/.svelte-kit",
70
71
  "**/.vercel",
71
72
  "**/.changeset",
72
73
  "**/.idea",
@@ -1769,7 +1770,7 @@ async function typescript(options = {}) {
1769
1770
  `${GLOB_MARKDOWN}/**`,
1770
1771
  GLOB_ASTRO_TS
1771
1772
  ];
1772
- const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
1773
+ const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
1773
1774
  const isTypeAware = !!tsconfigPath;
1774
1775
  const typeAwareRules = {
1775
1776
  "dot-notation": "off",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "2.22.2",
4
+ "version": "2.22.4",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -86,7 +86,7 @@
86
86
  "@stylistic/eslint-plugin": "^2.6.0-beta.0",
87
87
  "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
88
88
  "@typescript-eslint/parser": "8.0.0-alpha.40",
89
- "eslint-config-flat-gitignore": "^0.1.7",
89
+ "eslint-config-flat-gitignore": "^0.1.8",
90
90
  "eslint-flat-config-utils": "^0.2.5",
91
91
  "eslint-merge-processors": "^0.1.0",
92
92
  "eslint-plugin-antfu": "^2.3.4",
@@ -119,7 +119,7 @@
119
119
  },
120
120
  "devDependencies": {
121
121
  "@antfu/ni": "^0.22.0",
122
- "@eslint-react/eslint-plugin": "^1.5.25",
122
+ "@eslint-react/eslint-plugin": "^1.5.26",
123
123
  "@eslint/config-inspector": "^0.5.1",
124
124
  "@prettier/plugin-xml": "^3.4.1",
125
125
  "@stylistic/eslint-plugin-migrate": "^2.3.0",
@@ -128,7 +128,7 @@
128
128
  "@types/node": "^20.14.10",
129
129
  "@types/prompts": "^2.4.9",
130
130
  "@types/yargs": "^17.0.32",
131
- "@unocss/eslint-plugin": "^0.61.3",
131
+ "@unocss/eslint-plugin": "^0.61.4",
132
132
  "astro-eslint-parser": "^1.0.2",
133
133
  "bumpp": "^9.4.1",
134
134
  "eslint": "npm:eslint-ts-patch@9.5.0-0",
@@ -154,9 +154,9 @@
154
154
  "tsup": "^8.1.0",
155
155
  "tsx": "^4.16.2",
156
156
  "typescript": "^5.5.3",
157
- "vitest": "^2.0.2",
157
+ "vitest": "^2.0.3",
158
158
  "vue": "^3.4.31",
159
- "@antfu/eslint-config": "2.22.2"
159
+ "@antfu/eslint-config": "2.22.4"
160
160
  },
161
161
  "resolutions": {
162
162
  "tsx": "~4.16.2"