@infernodesign/eslint-config 2.15.1 → 2.16.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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_NAME } from "./constants-BxEizS7D.js";
1
+ import { t as PACKAGE_NAME } from "./constants-JlDUTs3Q.js";
2
2
  import fsPromises from "node:fs/promises";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
@@ -7,10 +7,9 @@ import c, { green } from "ansis";
7
7
  import { cac } from "cac";
8
8
  import parse from "parse-gitignore";
9
9
  import { execSync } from "node:child_process";
10
- //#region package.json
11
- var version = "2.15.1";
12
- //#endregion
13
- //#region src/cli/constants.ts
10
+ // package.json
11
+ var version = "2.16.0";
12
+ // src/cli/constants.ts
14
13
  const vscodeSettingsString = `
15
14
  // Disable the default formatter, use eslint instead
16
15
  "prettier.enable": false,
@@ -147,8 +146,7 @@ const dependenciesMap = {
147
146
  unocss: ["@unocss/eslint-plugin"],
148
147
  vue: []
149
148
  };
150
- //#endregion
151
- //#region src/cli/utils.ts
149
+ // src/cli/utils.ts
152
150
  function getEslintConfigContent(mainConfig, additionalConfigs) {
153
151
  return `
154
152
  import { config } from '${PACKAGE_NAME}'
@@ -166,8 +164,7 @@ function isGitClean() {
166
164
  return false;
167
165
  }
168
166
  }
169
- //#endregion
170
- //#region src/cli/stages/update-eslint-files.ts
167
+ // src/cli/stages/update-eslint-files.ts
171
168
  const ESLINT_OR_PRETTIER = /eslint|prettier/;
172
169
  async function updateEslintFiles(result) {
173
170
  const cwd = process.cwd();
@@ -199,13 +196,12 @@ async function updateEslintFiles(result) {
199
196
  });
200
197
  if (legacyConfig.length) p.note(c.dim(legacyConfig.join(", ")), "You can now remove those files manually");
201
198
  }
202
- //#endregion
203
- //#region src/cli/constants-generated.ts
199
+ // src/cli/constants-generated.ts
204
200
  const versionsMap = {
205
- "@eslint-react/eslint-plugin": "^5.28.6",
206
- "@medusajs/eslint-plugin": "^2.22.0",
207
- "@next/eslint-plugin-next": "^16.4.2",
208
- "@sanity-labs/eslint-plugin": "^1.0.5",
201
+ "@eslint-react/eslint-plugin": "^5.28.8",
202
+ "@medusajs/eslint-plugin": "^2.22.1",
203
+ "@next/eslint-plugin-next": "^16.4.3",
204
+ "@sanity-labs/eslint-plugin": "^1.0.7",
209
205
  "@shadcn/lint": "^0.2.3",
210
206
  "@unocss/eslint-plugin": "^66.11.0",
211
207
  "astro-eslint-parser": "^3.2.0",
@@ -217,12 +213,11 @@ const versionsMap = {
217
213
  "eslint-plugin-solid": "^0.18.1",
218
214
  "eslint-plugin-storybook": "^10.6.3",
219
215
  "eslint-plugin-svelte": "^3.23.1",
220
- "prettier-plugin-astro": "^1.1.1",
216
+ "prettier-plugin-astro": "^1.1.2",
221
217
  "prettier-plugin-slidev": "^1.0.5",
222
- "svelte-eslint-parser": "^1.9.0"
218
+ "svelte-eslint-parser": "^1.10.0"
223
219
  };
224
- //#endregion
225
- //#region src/cli/stages/update-package-json.ts
220
+ // src/cli/stages/update-package-json.ts
226
221
  async function updatePackageJson(result) {
227
222
  const cwd = process.cwd();
228
223
  const pathPackageJSON = path.join(cwd, "package.json");
@@ -259,8 +254,7 @@ async function updatePackageJson(result) {
259
254
  await fsPromises.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
260
255
  p.log.success(c.green`Changes wrote to package.json`);
261
256
  }
262
- //#endregion
263
- //#region src/cli/stages/update-vscode-settings.ts
257
+ // src/cli/stages/update-vscode-settings.ts
264
258
  const LAST_LINE_PATTERN = /\s*\}$/;
265
259
  async function updateVscodeSettings(result) {
266
260
  const cwd = process.cwd();
@@ -280,8 +274,7 @@ async function updateVscodeSettings(result) {
280
274
  p.log.success(green`Updated .vscode/settings.json`);
281
275
  }
282
276
  }
283
- //#endregion
284
- //#region src/cli/run.ts
277
+ // src/cli/run.ts
285
278
  async function run(options = {}) {
286
279
  const argSkipPrompt = !!process.env.SKIP_PROMPT || options.yes;
287
280
  const argTemplate = options.frameworks?.map((m) => m?.trim()).filter(Boolean);
@@ -344,8 +337,7 @@ async function run(options = {}) {
344
337
  p.log.success(c.green`Setup completed`);
345
338
  p.outro(`Now you can update the dependencies by running ${c.blue("npm install")} and run ${c.blue("eslint --fix")}\n`);
346
339
  }
347
- //#endregion
348
- //#region src/cli/index.ts
340
+ // src/cli/index.ts
349
341
  function header() {
350
342
  console.log("\n");
351
343
  p.intro(`${c.green`${PACKAGE_NAME} `}${c.dim`v${version}`}`);
@@ -364,5 +356,4 @@ cli.command("", "Run the initialization or migration").option("--yes, -y", "Skip
364
356
  cli.help();
365
357
  cli.version(version);
366
358
  cli.parse();
367
- //#endregion
368
359
  export {};
@@ -1,4 +1,3 @@
1
- //#region src/constants.ts
1
+ // src/constants.ts
2
2
  const PACKAGE_NAME = "@infernodesign/eslint-config";
3
- //#endregion
4
3
  export { PACKAGE_NAME as t };