@antfu/eslint-config 2.27.0 → 2.27.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.cjs CHANGED
@@ -48,8 +48,8 @@ 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.27.0",
52
- packageManager: "pnpm@9.7.1",
51
+ version: "2.27.1",
52
+ packageManager: "pnpm@9.8.0",
53
53
  description: "Anthony's ESLint config",
54
54
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
55
55
  license: "MIT",
@@ -153,7 +153,7 @@ var package_default = {
153
153
  "eslint-config-flat-gitignore": "^0.1.8",
154
154
  "eslint-flat-config-utils": "^0.3.1",
155
155
  "eslint-merge-processors": "^0.1.0",
156
- "eslint-plugin-antfu": "^2.3.5",
156
+ "eslint-plugin-antfu": "^2.3.6",
157
157
  "eslint-plugin-command": "^0.2.3",
158
158
  "eslint-plugin-import-x": "^3.1.0",
159
159
  "eslint-plugin-jsdoc": "^50.2.2",
@@ -182,23 +182,23 @@ var package_default = {
182
182
  devDependencies: {
183
183
  "@antfu/eslint-config": "workspace:*",
184
184
  "@antfu/ni": "^0.22.4",
185
- "@eslint-react/eslint-plugin": "^1.12.0",
185
+ "@eslint-react/eslint-plugin": "^1.12.1",
186
186
  "@eslint/config-inspector": "^0.5.4",
187
187
  "@prettier/plugin-xml": "^3.4.1",
188
188
  "@stylistic/eslint-plugin-migrate": "^2.6.4",
189
189
  "@types/eslint": "^9.6.0",
190
190
  "@types/fs-extra": "^11.0.4",
191
- "@types/node": "^22.4.2",
191
+ "@types/node": "^22.5.0",
192
192
  "@types/prompts": "^2.4.9",
193
193
  "@types/yargs": "^17.0.33",
194
194
  "@unocss/eslint-plugin": "^0.62.2",
195
195
  "astro-eslint-parser": "^1.0.2",
196
- bumpp: "^9.5.1",
196
+ bumpp: "^9.5.2",
197
197
  eslint: "^9.9.0",
198
198
  "eslint-plugin-astro": "^1.2.3",
199
199
  "eslint-plugin-format": "^0.1.2",
200
200
  "eslint-plugin-react-hooks": "^4.6.2",
201
- "eslint-plugin-react-refresh": "^0.4.10",
201
+ "eslint-plugin-react-refresh": "^0.4.11",
202
202
  "eslint-plugin-solid": "^0.14.2",
203
203
  "eslint-plugin-svelte": "^2.43.0",
204
204
  "eslint-typegen": "^0.3.1",
package/dist/cli.js CHANGED
@@ -19,8 +19,8 @@ import c from "picocolors";
19
19
  var package_default = {
20
20
  name: "@antfu/eslint-config",
21
21
  type: "module",
22
- version: "2.27.0",
23
- packageManager: "pnpm@9.7.1",
22
+ version: "2.27.1",
23
+ packageManager: "pnpm@9.8.0",
24
24
  description: "Anthony's ESLint config",
25
25
  author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
26
26
  license: "MIT",
@@ -124,7 +124,7 @@ var package_default = {
124
124
  "eslint-config-flat-gitignore": "^0.1.8",
125
125
  "eslint-flat-config-utils": "^0.3.1",
126
126
  "eslint-merge-processors": "^0.1.0",
127
- "eslint-plugin-antfu": "^2.3.5",
127
+ "eslint-plugin-antfu": "^2.3.6",
128
128
  "eslint-plugin-command": "^0.2.3",
129
129
  "eslint-plugin-import-x": "^3.1.0",
130
130
  "eslint-plugin-jsdoc": "^50.2.2",
@@ -153,23 +153,23 @@ var package_default = {
153
153
  devDependencies: {
154
154
  "@antfu/eslint-config": "workspace:*",
155
155
  "@antfu/ni": "^0.22.4",
156
- "@eslint-react/eslint-plugin": "^1.12.0",
156
+ "@eslint-react/eslint-plugin": "^1.12.1",
157
157
  "@eslint/config-inspector": "^0.5.4",
158
158
  "@prettier/plugin-xml": "^3.4.1",
159
159
  "@stylistic/eslint-plugin-migrate": "^2.6.4",
160
160
  "@types/eslint": "^9.6.0",
161
161
  "@types/fs-extra": "^11.0.4",
162
- "@types/node": "^22.4.2",
162
+ "@types/node": "^22.5.0",
163
163
  "@types/prompts": "^2.4.9",
164
164
  "@types/yargs": "^17.0.33",
165
165
  "@unocss/eslint-plugin": "^0.62.2",
166
166
  "astro-eslint-parser": "^1.0.2",
167
- bumpp: "^9.5.1",
167
+ bumpp: "^9.5.2",
168
168
  eslint: "^9.9.0",
169
169
  "eslint-plugin-astro": "^1.2.3",
170
170
  "eslint-plugin-format": "^0.1.2",
171
171
  "eslint-plugin-react-hooks": "^4.6.2",
172
- "eslint-plugin-react-refresh": "^0.4.10",
172
+ "eslint-plugin-react-refresh": "^0.4.11",
173
173
  "eslint-plugin-solid": "^0.14.2",
174
174
  "eslint-plugin-svelte": "^2.43.0",
175
175
  "eslint-typegen": "^0.3.1",
package/dist/index.cjs CHANGED
@@ -1882,6 +1882,7 @@ async function typescript(options = {}) {
1882
1882
  const {
1883
1883
  componentExts = [],
1884
1884
  overrides = {},
1885
+ overridesTypeAware = {},
1885
1886
  parserOptions = {},
1886
1887
  type = "app"
1887
1888
  } = options;
@@ -2021,7 +2022,10 @@ async function typescript(options = {}) {
2021
2022
  files: filesTypeAware,
2022
2023
  ignores: ignoresTypeAware,
2023
2024
  name: "antfu/typescript/rules-type-aware",
2024
- rules: typeAwareRules
2025
+ rules: {
2026
+ ...typeAwareRules,
2027
+ ...overridesTypeAware
2028
+ }
2025
2029
  }] : [],
2026
2030
  {
2027
2031
  files: ["**/*.d.?([cm])ts"],
package/dist/index.d.cts CHANGED
@@ -7801,24 +7801,25 @@ type AccessorPairs = []|[{
7801
7801
  // ----- antfu/consistent-list-newline -----
7802
7802
  type AntfuConsistentListNewline = []|[{
7803
7803
  ArrayExpression?: boolean
7804
+ ArrayPattern?: boolean
7804
7805
  ArrowFunctionExpression?: boolean
7805
7806
  CallExpression?: boolean
7806
7807
  ExportNamedDeclaration?: boolean
7807
7808
  FunctionDeclaration?: boolean
7808
7809
  FunctionExpression?: boolean
7809
7810
  ImportDeclaration?: boolean
7811
+ JSONArrayExpression?: boolean
7812
+ JSONObjectExpression?: boolean
7813
+ JSXOpeningElement?: boolean
7810
7814
  NewExpression?: boolean
7811
7815
  ObjectExpression?: boolean
7816
+ ObjectPattern?: boolean
7817
+ TSFunctionType?: boolean
7812
7818
  TSInterfaceDeclaration?: boolean
7813
7819
  TSTupleType?: boolean
7814
7820
  TSTypeLiteral?: boolean
7815
7821
  TSTypeParameterDeclaration?: boolean
7816
7822
  TSTypeParameterInstantiation?: boolean
7817
- ObjectPattern?: boolean
7818
- ArrayPattern?: boolean
7819
- JSXOpeningElement?: boolean
7820
- JSONArrayExpression?: boolean
7821
- JSONObjectExpression?: boolean
7822
7823
  }]
7823
7824
  // ----- antfu/indent-unindent -----
7824
7825
  type AntfuIndentUnindent = []|[{
@@ -10672,6 +10673,9 @@ type ReactHooksExhaustiveDeps = []|[{
10672
10673
  }]
10673
10674
  // ----- react-naming-convention/component-name -----
10674
10675
  type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
10676
+ allowAllCaps?: boolean
10677
+ allowLeadingUnderscore?: boolean
10678
+ allowNamespace?: boolean
10675
10679
  excepts?: string[]
10676
10680
  rule?: ("PascalCase" | "CONSTANT_CASE")
10677
10681
  })]
@@ -15051,6 +15055,10 @@ interface OptionsTypeScriptWithTypes {
15051
15055
  * @see https://typescript-eslint.io/linting/typed-linting/
15052
15056
  */
15053
15057
  tsconfigPath?: string;
15058
+ /**
15059
+ * Override type aware rules.
15060
+ */
15061
+ overridesTypeAware?: TypedFlatConfigItem['rules'];
15054
15062
  }
15055
15063
  interface OptionsHasTypeScript {
15056
15064
  typescript?: boolean;
package/dist/index.d.ts CHANGED
@@ -7801,24 +7801,25 @@ type AccessorPairs = []|[{
7801
7801
  // ----- antfu/consistent-list-newline -----
7802
7802
  type AntfuConsistentListNewline = []|[{
7803
7803
  ArrayExpression?: boolean
7804
+ ArrayPattern?: boolean
7804
7805
  ArrowFunctionExpression?: boolean
7805
7806
  CallExpression?: boolean
7806
7807
  ExportNamedDeclaration?: boolean
7807
7808
  FunctionDeclaration?: boolean
7808
7809
  FunctionExpression?: boolean
7809
7810
  ImportDeclaration?: boolean
7811
+ JSONArrayExpression?: boolean
7812
+ JSONObjectExpression?: boolean
7813
+ JSXOpeningElement?: boolean
7810
7814
  NewExpression?: boolean
7811
7815
  ObjectExpression?: boolean
7816
+ ObjectPattern?: boolean
7817
+ TSFunctionType?: boolean
7812
7818
  TSInterfaceDeclaration?: boolean
7813
7819
  TSTupleType?: boolean
7814
7820
  TSTypeLiteral?: boolean
7815
7821
  TSTypeParameterDeclaration?: boolean
7816
7822
  TSTypeParameterInstantiation?: boolean
7817
- ObjectPattern?: boolean
7818
- ArrayPattern?: boolean
7819
- JSXOpeningElement?: boolean
7820
- JSONArrayExpression?: boolean
7821
- JSONObjectExpression?: boolean
7822
7823
  }]
7823
7824
  // ----- antfu/indent-unindent -----
7824
7825
  type AntfuIndentUnindent = []|[{
@@ -10672,6 +10673,9 @@ type ReactHooksExhaustiveDeps = []|[{
10672
10673
  }]
10673
10674
  // ----- react-naming-convention/component-name -----
10674
10675
  type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
10676
+ allowAllCaps?: boolean
10677
+ allowLeadingUnderscore?: boolean
10678
+ allowNamespace?: boolean
10675
10679
  excepts?: string[]
10676
10680
  rule?: ("PascalCase" | "CONSTANT_CASE")
10677
10681
  })]
@@ -15051,6 +15055,10 @@ interface OptionsTypeScriptWithTypes {
15051
15055
  * @see https://typescript-eslint.io/linting/typed-linting/
15052
15056
  */
15053
15057
  tsconfigPath?: string;
15058
+ /**
15059
+ * Override type aware rules.
15060
+ */
15061
+ overridesTypeAware?: TypedFlatConfigItem['rules'];
15054
15062
  }
15055
15063
  interface OptionsHasTypeScript {
15056
15064
  typescript?: boolean;
package/dist/index.js CHANGED
@@ -1771,6 +1771,7 @@ async function typescript(options = {}) {
1771
1771
  const {
1772
1772
  componentExts = [],
1773
1773
  overrides = {},
1774
+ overridesTypeAware = {},
1774
1775
  parserOptions = {},
1775
1776
  type = "app"
1776
1777
  } = options;
@@ -1910,7 +1911,10 @@ async function typescript(options = {}) {
1910
1911
  files: filesTypeAware,
1911
1912
  ignores: ignoresTypeAware,
1912
1913
  name: "antfu/typescript/rules-type-aware",
1913
- rules: typeAwareRules
1914
+ rules: {
1915
+ ...typeAwareRules,
1916
+ ...overridesTypeAware
1917
+ }
1914
1918
  }] : [],
1915
1919
  {
1916
1920
  files: ["**/*.d.?([cm])ts"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "2.27.0",
4
+ "version": "2.27.1",
5
5
  "description": "Anthony's ESLint config",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
7
7
  "license": "MIT",
@@ -91,7 +91,7 @@
91
91
  "eslint-config-flat-gitignore": "^0.1.8",
92
92
  "eslint-flat-config-utils": "^0.3.1",
93
93
  "eslint-merge-processors": "^0.1.0",
94
- "eslint-plugin-antfu": "^2.3.5",
94
+ "eslint-plugin-antfu": "^2.3.6",
95
95
  "eslint-plugin-command": "^0.2.3",
96
96
  "eslint-plugin-import-x": "^3.1.0",
97
97
  "eslint-plugin-jsdoc": "^50.2.2",
@@ -119,23 +119,23 @@
119
119
  },
120
120
  "devDependencies": {
121
121
  "@antfu/ni": "^0.22.4",
122
- "@eslint-react/eslint-plugin": "^1.12.0",
122
+ "@eslint-react/eslint-plugin": "^1.12.1",
123
123
  "@eslint/config-inspector": "^0.5.4",
124
124
  "@prettier/plugin-xml": "^3.4.1",
125
125
  "@stylistic/eslint-plugin-migrate": "^2.6.4",
126
126
  "@types/eslint": "^9.6.0",
127
127
  "@types/fs-extra": "^11.0.4",
128
- "@types/node": "^22.4.2",
128
+ "@types/node": "^22.5.0",
129
129
  "@types/prompts": "^2.4.9",
130
130
  "@types/yargs": "^17.0.33",
131
131
  "@unocss/eslint-plugin": "^0.62.2",
132
132
  "astro-eslint-parser": "^1.0.2",
133
- "bumpp": "^9.5.1",
133
+ "bumpp": "^9.5.2",
134
134
  "eslint": "^9.9.0",
135
135
  "eslint-plugin-astro": "^1.2.3",
136
136
  "eslint-plugin-format": "^0.1.2",
137
137
  "eslint-plugin-react-hooks": "^4.6.2",
138
- "eslint-plugin-react-refresh": "^0.4.10",
138
+ "eslint-plugin-react-refresh": "^0.4.11",
139
139
  "eslint-plugin-solid": "^0.14.2",
140
140
  "eslint-plugin-svelte": "^2.43.0",
141
141
  "eslint-typegen": "^0.3.1",
@@ -156,7 +156,7 @@
156
156
  "typescript": "^5.5.4",
157
157
  "vitest": "^2.0.5",
158
158
  "vue": "^3.4.38",
159
- "@antfu/eslint-config": "2.27.0"
159
+ "@antfu/eslint-config": "2.27.1"
160
160
  },
161
161
  "resolutions": {
162
162
  "@eslint-community/eslint-utils": "^4.4.0",