@antfu/eslint-config 4.0.1 → 4.1.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.js CHANGED
@@ -12,7 +12,7 @@ import c from "picocolors";
12
12
  var package_default = {
13
13
  name: "@antfu/eslint-config",
14
14
  type: "module",
15
- version: "4.0.1",
15
+ version: "4.1.1",
16
16
  packageManager: "pnpm@10.0.0",
17
17
  description: "Anthony's ESLint config",
18
18
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -108,12 +108,12 @@ var package_default = {
108
108
  "@clack/prompts": "^0.9.1",
109
109
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
110
110
  "@eslint/markdown": "^6.2.2",
111
- "@stylistic/eslint-plugin": "^3.0.0",
112
- "@typescript-eslint/eslint-plugin": "^8.21.0",
113
- "@typescript-eslint/parser": "^8.21.0",
111
+ "@stylistic/eslint-plugin": "^3.0.1",
112
+ "@typescript-eslint/eslint-plugin": "^8.22.0",
113
+ "@typescript-eslint/parser": "^8.22.0",
114
114
  "@vitest/eslint-plugin": "^1.1.25",
115
- "eslint-config-flat-gitignore": "^1.0.0",
116
- "eslint-flat-config-utils": "^2.0.0",
115
+ "eslint-config-flat-gitignore": "^2.0.0",
116
+ "eslint-flat-config-utils": "^2.0.1",
117
117
  "eslint-merge-processors": "^1.0.0",
118
118
  "eslint-plugin-antfu": "^3.0.0",
119
119
  "eslint-plugin-command": "^3.0.0",
@@ -142,13 +142,13 @@ var package_default = {
142
142
  },
143
143
  devDependencies: {
144
144
  "@antfu/eslint-config": "workspace:*",
145
- "@antfu/ni": "^23.2.0",
146
- "@eslint-react/eslint-plugin": "^1.24.1",
145
+ "@antfu/ni": "^23.3.1",
146
+ "@eslint-react/eslint-plugin": "^1.26.0",
147
147
  "@eslint/config-inspector": "^1.0.0",
148
148
  "@prettier/plugin-xml": "^3.4.1",
149
- "@stylistic/eslint-plugin-migrate": "^3.0.0",
149
+ "@stylistic/eslint-plugin-migrate": "^3.0.1",
150
150
  "@types/fs-extra": "^11.0.4",
151
- "@types/node": "^22.10.10",
151
+ "@types/node": "^22.13.0",
152
152
  "@types/prompts": "^2.4.9",
153
153
  "@types/yargs": "^17.0.33",
154
154
  "@unocss/eslint-plugin": "^65.4.3",
@@ -166,14 +166,14 @@ var package_default = {
166
166
  "fast-glob": "^3.3.3",
167
167
  "fs-extra": "^11.3.0",
168
168
  jiti: "^2.4.2",
169
- "lint-staged": "^15.4.2",
169
+ "lint-staged": "^15.4.3",
170
170
  "prettier-plugin-astro": "^0.14.1",
171
171
  "prettier-plugin-slidev": "^1.0.5",
172
172
  rimraf: "^6.0.1",
173
173
  "simple-git-hooks": "^2.11.1",
174
- svelte: "^5.19.3",
174
+ svelte: "^5.19.6",
175
175
  "svelte-eslint-parser": "^0.43.0",
176
- tsup: "^8.3.5",
176
+ tsup: "^8.3.6",
177
177
  tsx: "^4.19.2",
178
178
  typescript: "^5.7.3",
179
179
  vitest: "^3.0.4",
@@ -181,7 +181,7 @@ var package_default = {
181
181
  },
182
182
  resolutions: {
183
183
  "@eslint-community/eslint-utils": "^4.4.1",
184
- "@typescript-eslint/utils": "^8.21.0",
184
+ "@typescript-eslint/utils": "^8.22.0",
185
185
  eslint: "^9.19.0",
186
186
  tsx: "^4.19.2"
187
187
  },
package/dist/index.d.ts CHANGED
@@ -3222,6 +3222,11 @@ interface RuleOptions {
3222
3222
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3223
3223
  */
3224
3224
  'react/no-unused-state'?: Linter.RuleEntry<[]>
3225
+ /**
3226
+ * disallow the use of 'useContext'
3227
+ * @see https://eslint-react.xyz/docs/rules/no-use-context
3228
+ */
3229
+ 'react/no-use-context'?: Linter.RuleEntry<[]>
3225
3230
  /**
3226
3231
  * disallow unnecessary fragments
3227
3232
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
package/dist/index.js CHANGED
@@ -697,6 +697,7 @@ async function imports(options = {}) {
697
697
  "antfu/import-dedupe": "error",
698
698
  "antfu/no-import-dist": "error",
699
699
  "antfu/no-import-node-modules-by-path": "error",
700
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
700
701
  "import/first": "error",
701
702
  "import/no-duplicates": "error",
702
703
  "import/no-mutable-exports": "error",
@@ -2019,6 +2020,7 @@ async function typescript(options = {}) {
2019
2020
  "ts/consistent-type-definitions": ["error", "interface"],
2020
2021
  "ts/consistent-type-imports": ["error", {
2021
2022
  disallowTypeAnnotations: false,
2023
+ fixStyle: "separate-type-imports",
2022
2024
  prefer: "type-imports"
2023
2025
  }],
2024
2026
  "ts/method-signature-style": ["error", "property"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "4.0.1",
4
+ "version": "4.1.1",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -82,12 +82,12 @@
82
82
  "@clack/prompts": "^0.9.1",
83
83
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
84
84
  "@eslint/markdown": "^6.2.2",
85
- "@stylistic/eslint-plugin": "^3.0.0",
86
- "@typescript-eslint/eslint-plugin": "^8.21.0",
87
- "@typescript-eslint/parser": "^8.21.0",
85
+ "@stylistic/eslint-plugin": "^3.0.1",
86
+ "@typescript-eslint/eslint-plugin": "^8.22.0",
87
+ "@typescript-eslint/parser": "^8.22.0",
88
88
  "@vitest/eslint-plugin": "^1.1.25",
89
- "eslint-config-flat-gitignore": "^1.0.0",
90
- "eslint-flat-config-utils": "^2.0.0",
89
+ "eslint-config-flat-gitignore": "^2.0.0",
90
+ "eslint-flat-config-utils": "^2.0.1",
91
91
  "eslint-merge-processors": "^1.0.0",
92
92
  "eslint-plugin-antfu": "^3.0.0",
93
93
  "eslint-plugin-command": "^3.0.0",
@@ -115,13 +115,13 @@
115
115
  "yargs": "^17.7.2"
116
116
  },
117
117
  "devDependencies": {
118
- "@antfu/ni": "^23.2.0",
119
- "@eslint-react/eslint-plugin": "^1.24.1",
118
+ "@antfu/ni": "^23.3.1",
119
+ "@eslint-react/eslint-plugin": "^1.26.0",
120
120
  "@eslint/config-inspector": "^1.0.0",
121
121
  "@prettier/plugin-xml": "^3.4.1",
122
- "@stylistic/eslint-plugin-migrate": "^3.0.0",
122
+ "@stylistic/eslint-plugin-migrate": "^3.0.1",
123
123
  "@types/fs-extra": "^11.0.4",
124
- "@types/node": "^22.10.10",
124
+ "@types/node": "^22.13.0",
125
125
  "@types/prompts": "^2.4.9",
126
126
  "@types/yargs": "^17.0.33",
127
127
  "@unocss/eslint-plugin": "^65.4.3",
@@ -139,23 +139,23 @@
139
139
  "fast-glob": "^3.3.3",
140
140
  "fs-extra": "^11.3.0",
141
141
  "jiti": "^2.4.2",
142
- "lint-staged": "^15.4.2",
142
+ "lint-staged": "^15.4.3",
143
143
  "prettier-plugin-astro": "^0.14.1",
144
144
  "prettier-plugin-slidev": "^1.0.5",
145
145
  "rimraf": "^6.0.1",
146
146
  "simple-git-hooks": "^2.11.1",
147
- "svelte": "^5.19.3",
147
+ "svelte": "^5.19.6",
148
148
  "svelte-eslint-parser": "^0.43.0",
149
- "tsup": "^8.3.5",
149
+ "tsup": "^8.3.6",
150
150
  "tsx": "^4.19.2",
151
151
  "typescript": "^5.7.3",
152
152
  "vitest": "^3.0.4",
153
153
  "vue": "^3.5.13",
154
- "@antfu/eslint-config": "4.0.1"
154
+ "@antfu/eslint-config": "4.1.1"
155
155
  },
156
156
  "resolutions": {
157
157
  "@eslint-community/eslint-utils": "^4.4.1",
158
- "@typescript-eslint/utils": "^8.21.0",
158
+ "@typescript-eslint/utils": "^8.22.0",
159
159
  "eslint": "^9.19.0",
160
160
  "tsx": "^4.19.2"
161
161
  },