@antfu/eslint-config 2.22.2 → 2.22.3

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
@@ -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.3",
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/)",
@@ -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",
@@ -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.3",
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/)",
@@ -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",
@@ -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
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
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.3",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -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",
@@ -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.3"
160
160
  },
161
161
  "resolutions": {
162
162
  "tsx": "~4.16.2"