@kirklin/eslint-config 5.1.1 → 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 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 = "5.1.1";
12
+ var version = "6.0.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
@@ -24,7 +24,7 @@ const vscodeSettingsString = `
24
24
  "source.organizeImports": "never"
25
25
  },
26
26
 
27
- // Silent the stylistic rules in you IDE, but still auto fix them
27
+ // Silent the stylistic rules in your IDE, but still auto fix them
28
28
  "eslint.rules.customizations": [
29
29
  { "rule": "style/*", "severity": "off", "fixable": true },
30
30
  { "rule": "format/*", "severity": "off", "fixable": true },
@@ -144,15 +144,12 @@ async function updateEslintFiles(result) {
144
144
  const pathESLintIgnore = path.join(cwd, ".eslintignore");
145
145
  const pathPackageJSON = path.join(cwd, "package.json");
146
146
  const pkgContent = await fsp.readFile(pathPackageJSON, "utf-8");
147
- const pkg = JSON.parse(pkgContent);
148
- const configFileName = pkg.type === "module" ? "eslint.config.js" : "eslint.config.mjs";
147
+ const configFileName = JSON.parse(pkgContent).type === "module" ? "eslint.config.js" : "eslint.config.mjs";
149
148
  const pathFlatConfig = path.join(cwd, configFileName);
150
149
  const eslintIgnores = [];
151
150
  if (fs.existsSync(pathESLintIgnore)) {
152
151
  p.log.step(c.cyan`Migrating existing .eslintignore`);
153
- const content = await fsp.readFile(pathESLintIgnore, "utf-8");
154
- const parsed = parse(content);
155
- const globs = parsed.globs();
152
+ const globs = parse(await fsp.readFile(pathESLintIgnore, "utf-8")).globs();
156
153
  for (const glob of globs) if (glob.type === "ignore") eslintIgnores.push(...glob.patterns);
157
154
  else if (glob.type === "unignore") eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
158
155
  }
@@ -161,9 +158,7 @@ async function updateEslintFiles(result) {
161
158
  if (result.extra.includes("formatter")) configLines.push(`formatters: true,`);
162
159
  if (result.extra.includes("unocss")) configLines.push(`unocss: true,`);
163
160
  for (const framework of result.frameworks) configLines.push(`${framework}: true,`);
164
- const mainConfig = configLines.map((i) => ` ${i}`).join("\n");
165
- const additionalConfig = [];
166
- const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
161
+ const eslintConfigContent = getEslintConfigContent(configLines.map((i) => ` ${i}`).join("\n"), []);
167
162
  await fsp.writeFile(pathFlatConfig, eslintConfigContent);
168
163
  p.log.success(c.green`Created ${configFileName}`);
169
164
  const files = fs.readdirSync(cwd);
@@ -177,20 +172,20 @@ async function updateEslintFiles(result) {
177
172
  //#endregion
178
173
  //#region src/cli/constants-generated.ts
179
174
  const versionsMap = {
180
- "@eslint-react/eslint-plugin": "^1.52.9",
181
- "@next/eslint-plugin-next": "^15.5.2",
182
- "@unocss/eslint-plugin": "^66.5.0",
175
+ "@eslint-react/eslint-plugin": "^2.2.4",
176
+ "@next/eslint-plugin-next": "^16.0.1",
177
+ "@unocss/eslint-plugin": "^66.5.4",
183
178
  "astro-eslint-parser": "^1.2.2",
184
- "eslint": "^9.34.0",
185
- "eslint-plugin-astro": "^1.3.1",
186
- "eslint-plugin-format": "^1.0.1",
187
- "eslint-plugin-react-hooks": "^5.2.0",
188
- "eslint-plugin-react-refresh": "^0.4.20",
179
+ "eslint": "^9.38.0",
180
+ "eslint-plugin-astro": "^1.4.0",
181
+ "eslint-plugin-format": "^1.0.2",
182
+ "eslint-plugin-react-hooks": "^7.0.1",
183
+ "eslint-plugin-react-refresh": "^0.4.24",
189
184
  "eslint-plugin-solid": "^0.14.5",
190
- "eslint-plugin-svelte": "^3.11.0",
185
+ "eslint-plugin-svelte": "^3.13.0",
191
186
  "prettier-plugin-astro": "^0.14.1",
192
187
  "prettier-plugin-slidev": "^1.0.5",
193
- "svelte-eslint-parser": "^1.3.1"
188
+ "svelte-eslint-parser": "^1.4.0"
194
189
  };
195
190
 
196
191
  //#endregion