@antfu/eslint-config 7.5.0 → 7.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.mjs +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +11 -9
- package/package.json +8 -9
package/dist/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "7.
|
|
12
|
+
var version = "7.6.1";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -174,18 +174,18 @@ async function updateEslintFiles(result) {
|
|
|
174
174
|
const versionsMap = {
|
|
175
175
|
"@eslint-react/eslint-plugin": "^2.13.0",
|
|
176
176
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
177
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
177
|
+
"@unocss/eslint-plugin": "^66.6.1",
|
|
178
178
|
"astro-eslint-parser": "^1.3.0",
|
|
179
179
|
"eslint": "^10.0.2",
|
|
180
180
|
"eslint-plugin-astro": "^1.6.0",
|
|
181
|
-
"eslint-plugin-format": "^2.0.
|
|
181
|
+
"eslint-plugin-format": "^2.0.1",
|
|
182
182
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
183
183
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
184
184
|
"eslint-plugin-solid": "^0.14.5",
|
|
185
185
|
"eslint-plugin-svelte": "^3.15.0",
|
|
186
186
|
"prettier-plugin-astro": "^0.14.1",
|
|
187
187
|
"prettier-plugin-slidev": "^1.0.5",
|
|
188
|
-
"svelte-eslint-parser": "^1.5.
|
|
188
|
+
"svelte-eslint-parser": "^1.5.1"
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -19773,7 +19773,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
19773
19773
|
onlyEquality?: boolean;
|
|
19774
19774
|
}];
|
|
19775
19775
|
// Names of all the configs
|
|
19776
|
-
type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/rules' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/rules' | 'antfu/markdown/disables/markdown' | 'antfu/markdown/disables/code' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
|
|
19776
|
+
type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/setup' | 'antfu/node/rules' | 'antfu/jsdoc/setup' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/rules' | 'antfu/markdown/disables/markdown' | 'antfu/markdown/disables/code' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
|
|
19777
19777
|
//#endregion
|
|
19778
19778
|
//#region src/vender/prettier-types.d.ts
|
|
19779
19779
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -911,9 +911,11 @@ async function javascript(options = {}) {
|
|
|
911
911
|
async function jsdoc(options = {}) {
|
|
912
912
|
const { stylistic: stylistic$1 = true } = options;
|
|
913
913
|
return [{
|
|
914
|
+
name: "antfu/jsdoc/setup",
|
|
915
|
+
plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) }
|
|
916
|
+
}, {
|
|
914
917
|
files: [GLOB_SRC],
|
|
915
918
|
name: "antfu/jsdoc/rules",
|
|
916
|
-
plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) },
|
|
917
919
|
rules: {
|
|
918
920
|
"jsdoc/check-access": "warn",
|
|
919
921
|
"jsdoc/check-param-names": "warn",
|
|
@@ -947,13 +949,12 @@ async function jsonc(options = {}) {
|
|
|
947
949
|
GLOB_JSONC
|
|
948
950
|
], overrides = {}, stylistic: stylistic$1 = true } = options;
|
|
949
951
|
const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
|
|
950
|
-
const [pluginJsonc, parserJsonc] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
|
|
951
952
|
return [{
|
|
952
953
|
name: "antfu/jsonc/setup",
|
|
953
|
-
plugins: { jsonc:
|
|
954
|
+
plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) }
|
|
954
955
|
}, {
|
|
955
956
|
files,
|
|
956
|
-
|
|
957
|
+
language: "jsonc/x",
|
|
957
958
|
name: "antfu/jsonc/rules",
|
|
958
959
|
rules: {
|
|
959
960
|
"jsonc/no-bigint-literals": "error",
|
|
@@ -1162,9 +1163,11 @@ async function nextjs(options = {}) {
|
|
|
1162
1163
|
//#region src/configs/node.ts
|
|
1163
1164
|
async function node() {
|
|
1164
1165
|
return [{
|
|
1166
|
+
name: "antfu/node/setup",
|
|
1167
|
+
plugins: { node: pluginNode }
|
|
1168
|
+
}, {
|
|
1165
1169
|
files: [GLOB_SRC],
|
|
1166
1170
|
name: "antfu/node/rules",
|
|
1167
|
-
plugins: { node: pluginNode },
|
|
1168
1171
|
rules: {
|
|
1169
1172
|
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
1170
1173
|
"node/no-deprecated-api": "error",
|
|
@@ -1241,17 +1244,16 @@ async function detectCatalogUsage() {
|
|
|
1241
1244
|
return yaml$1.includes("catalog:") || yaml$1.includes("catalogs:");
|
|
1242
1245
|
}
|
|
1243
1246
|
async function pnpm(options) {
|
|
1244
|
-
const [pluginPnpm, pluginYaml, yamlParser
|
|
1247
|
+
const [pluginPnpm, pluginYaml, yamlParser] = await Promise.all([
|
|
1245
1248
|
interopDefault(import("eslint-plugin-pnpm")),
|
|
1246
1249
|
interopDefault(import("eslint-plugin-yml")),
|
|
1247
|
-
interopDefault(import("yaml-eslint-parser"))
|
|
1248
|
-
interopDefault(import("jsonc-eslint-parser"))
|
|
1250
|
+
interopDefault(import("yaml-eslint-parser"))
|
|
1249
1251
|
]);
|
|
1250
1252
|
const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, yaml: yaml$1 = true } = options;
|
|
1251
1253
|
const configs$1 = [];
|
|
1252
1254
|
if (json) configs$1.push({
|
|
1253
1255
|
files: ["package.json", "**/package.json"],
|
|
1254
|
-
|
|
1256
|
+
language: "jsonc/x",
|
|
1255
1257
|
name: "antfu/pnpm/package-json",
|
|
1256
1258
|
plugins: { pnpm: pluginPnpm },
|
|
1257
1259
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.6.1",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -126,14 +126,14 @@
|
|
|
126
126
|
"eslint-flat-config-utils": "^3.0.1",
|
|
127
127
|
"eslint-merge-processors": "^2.0.0",
|
|
128
128
|
"eslint-plugin-antfu": "^3.2.2",
|
|
129
|
-
"eslint-plugin-command": "^3.5.
|
|
129
|
+
"eslint-plugin-command": "^3.5.2",
|
|
130
130
|
"eslint-plugin-import-lite": "^0.5.2",
|
|
131
131
|
"eslint-plugin-jsdoc": "^62.7.1",
|
|
132
132
|
"eslint-plugin-jsonc": "^3.1.0",
|
|
133
133
|
"eslint-plugin-n": "^17.24.0",
|
|
134
134
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
135
135
|
"eslint-plugin-perfectionist": "^5.6.0",
|
|
136
|
-
"eslint-plugin-pnpm": "^1.
|
|
136
|
+
"eslint-plugin-pnpm": "^1.6.0",
|
|
137
137
|
"eslint-plugin-regexp": "^3.0.0",
|
|
138
138
|
"eslint-plugin-toml": "^1.3.0",
|
|
139
139
|
"eslint-plugin-unicorn": "^63.0.0",
|
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
"eslint-plugin-yml": "^3.3.0",
|
|
143
143
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
144
144
|
"globals": "^17.3.0",
|
|
145
|
-
"jsonc-eslint-parser": "^3.1.0",
|
|
146
145
|
"local-pkg": "^1.1.2",
|
|
147
146
|
"parse-gitignore": "^2.0.0",
|
|
148
147
|
"toml-eslint-parser": "^1.0.3",
|
|
@@ -161,14 +160,14 @@
|
|
|
161
160
|
"@prettier/plugin-xml": "^3.4.2",
|
|
162
161
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
163
162
|
"@types/node": "^25.3.0",
|
|
164
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
163
|
+
"@unocss/eslint-plugin": "^66.6.1",
|
|
165
164
|
"astro-eslint-parser": "^1.3.0",
|
|
166
165
|
"baseline-browser-mapping": "^2.10.0",
|
|
167
166
|
"bumpp": "^10.4.1",
|
|
168
167
|
"eslint": "^10.0.2",
|
|
169
168
|
"eslint-plugin-astro": "^1.6.0",
|
|
170
169
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
171
|
-
"eslint-plugin-format": "^2.0.
|
|
170
|
+
"eslint-plugin-format": "^2.0.1",
|
|
172
171
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
173
172
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
174
173
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
@@ -180,19 +179,19 @@
|
|
|
180
179
|
"find-up-simple": "^1.0.1",
|
|
181
180
|
"jiti": "^2.6.1",
|
|
182
181
|
"lint-staged": "^16.2.7",
|
|
183
|
-
"pnpm-workspace-yaml": "^1.
|
|
182
|
+
"pnpm-workspace-yaml": "^1.6.0",
|
|
184
183
|
"prettier-plugin-astro": "^0.14.1",
|
|
185
184
|
"prettier-plugin-slidev": "^1.0.5",
|
|
186
185
|
"simple-git-hooks": "^2.13.1",
|
|
187
186
|
"svelte": "^5.53.3",
|
|
188
|
-
"svelte-eslint-parser": "^1.5.
|
|
187
|
+
"svelte-eslint-parser": "^1.5.1",
|
|
189
188
|
"tinyglobby": "^0.2.15",
|
|
190
189
|
"tsdown": "^0.18.4",
|
|
191
190
|
"tsx": "^4.21.0",
|
|
192
191
|
"typescript": "^5.9.3",
|
|
193
192
|
"vitest": "^4.0.18",
|
|
194
193
|
"vue": "^3.5.29",
|
|
195
|
-
"@antfu/eslint-config": "7.
|
|
194
|
+
"@antfu/eslint-config": "7.6.1"
|
|
196
195
|
},
|
|
197
196
|
"resolutions": {
|
|
198
197
|
"@eslint-community/eslint-utils": "catalog:peer",
|