@antfu/eslint-config 5.4.0 → 6.0.0
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.d.ts +1 -1
- package/dist/cli.js +12 -14
- package/dist/index.d.ts +355 -111
- package/dist/index.js +15 -6
- package/dist/lib-Cm-GRsZW.js +10961 -0
- package/package.json +40 -39
package/dist/cli.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { };
|
package/dist/cli.js
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 = "
|
|
12
|
+
var version = "6.0.0";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -149,8 +149,7 @@ async function updateEslintFiles(result) {
|
|
|
149
149
|
const eslintIgnores = [];
|
|
150
150
|
if (fs.existsSync(pathESLintIgnore)) {
|
|
151
151
|
p.log.step(c.cyan`Migrating existing .eslintignore`);
|
|
152
|
-
const
|
|
153
|
-
const globs = parse(content).globs();
|
|
152
|
+
const globs = parse(await fsp.readFile(pathESLintIgnore, "utf-8")).globs();
|
|
154
153
|
for (const glob of globs) if (glob.type === "ignore") eslintIgnores.push(...glob.patterns);
|
|
155
154
|
else if (glob.type === "unignore") eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
156
155
|
}
|
|
@@ -159,8 +158,7 @@ async function updateEslintFiles(result) {
|
|
|
159
158
|
if (result.extra.includes("formatter")) configLines.push(`formatters: true,`);
|
|
160
159
|
if (result.extra.includes("unocss")) configLines.push(`unocss: true,`);
|
|
161
160
|
for (const framework of result.frameworks) configLines.push(`${framework}: true,`);
|
|
162
|
-
const
|
|
163
|
-
const eslintConfigContent = getEslintConfigContent(mainConfig, []);
|
|
161
|
+
const eslintConfigContent = getEslintConfigContent(configLines.map((i) => ` ${i}`).join("\n"), []);
|
|
164
162
|
await fsp.writeFile(pathFlatConfig, eslintConfigContent);
|
|
165
163
|
p.log.success(c.green`Created ${configFileName}`);
|
|
166
164
|
const files = fs.readdirSync(cwd);
|
|
@@ -174,20 +172,20 @@ async function updateEslintFiles(result) {
|
|
|
174
172
|
//#endregion
|
|
175
173
|
//#region src/cli/constants-generated.ts
|
|
176
174
|
const versionsMap = {
|
|
177
|
-
"@eslint-react/eslint-plugin": "^
|
|
178
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
179
|
-
"@unocss/eslint-plugin": "^66.5.
|
|
175
|
+
"@eslint-react/eslint-plugin": "^2.2.2",
|
|
176
|
+
"@next/eslint-plugin-next": "^15.5.5",
|
|
177
|
+
"@unocss/eslint-plugin": "^66.5.3",
|
|
180
178
|
"astro-eslint-parser": "^1.2.2",
|
|
181
|
-
"eslint": "^9.
|
|
179
|
+
"eslint": "^9.37.0",
|
|
182
180
|
"eslint-plugin-astro": "^1.3.1",
|
|
183
|
-
"eslint-plugin-format": "^1.0.
|
|
184
|
-
"eslint-plugin-react-hooks": "^
|
|
185
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
181
|
+
"eslint-plugin-format": "^1.0.2",
|
|
182
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
183
|
+
"eslint-plugin-react-refresh": "^0.4.23",
|
|
186
184
|
"eslint-plugin-solid": "^0.14.5",
|
|
187
|
-
"eslint-plugin-svelte": "^3.12.
|
|
185
|
+
"eslint-plugin-svelte": "^3.12.4",
|
|
188
186
|
"prettier-plugin-astro": "^0.14.1",
|
|
189
187
|
"prettier-plugin-slidev": "^1.0.5",
|
|
190
|
-
"svelte-eslint-parser": "^1.3.
|
|
188
|
+
"svelte-eslint-parser": "^1.3.3"
|
|
191
189
|
};
|
|
192
190
|
|
|
193
191
|
//#endregion
|