@infernodesign/eslint-config 2.15.2 → 2.17.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 +20 -29
- package/dist/{constants-BxEizS7D.js → constants-JlDUTs3Q.js} +1 -2
- package/dist/index.d.ts +433 -486
- package/dist/index.js +41 -81
- package/package.json +37 -36
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_NAME } from "./constants-
|
|
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
|
-
|
|
11
|
-
var version = "2.
|
|
12
|
-
|
|
13
|
-
//#region src/cli/constants.ts
|
|
10
|
+
// package.json
|
|
11
|
+
var version = "2.17.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
|
-
|
|
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
|
-
|
|
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,30 +196,28 @@ 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
|
-
|
|
203
|
-
//#region src/cli/constants-generated.ts
|
|
199
|
+
// src/cli/constants-generated.ts
|
|
204
200
|
const versionsMap = {
|
|
205
|
-
"@eslint-react/eslint-plugin": "^5.28.
|
|
206
|
-
"@medusajs/eslint-plugin": "^2.
|
|
207
|
-
"@next/eslint-plugin-next": "^16.4.
|
|
208
|
-
"@sanity-labs/eslint-plugin": "^1.0.
|
|
201
|
+
"@eslint-react/eslint-plugin": "^5.28.8",
|
|
202
|
+
"@medusajs/eslint-plugin": "^2.22.2",
|
|
203
|
+
"@next/eslint-plugin-next": "^16.4.3",
|
|
204
|
+
"@sanity-labs/eslint-plugin": "^1.0.7",
|
|
209
205
|
"@shadcn/lint": "^0.2.3",
|
|
210
|
-
"@unocss/eslint-plugin": "^66.
|
|
206
|
+
"@unocss/eslint-plugin": "^66.12.0",
|
|
211
207
|
"astro-eslint-parser": "^3.2.0",
|
|
212
|
-
"eslint": "^10.
|
|
208
|
+
"eslint": "^10.14.0",
|
|
213
209
|
"eslint-plugin-astro": "^3.2.1",
|
|
214
210
|
"eslint-plugin-better-tailwindcss": "^4.10.0",
|
|
215
211
|
"eslint-plugin-format": "^2.0.1",
|
|
216
212
|
"eslint-plugin-react-refresh": "^0.5.7",
|
|
217
213
|
"eslint-plugin-solid": "^0.18.1",
|
|
218
|
-
"eslint-plugin-storybook": "^10.6.
|
|
214
|
+
"eslint-plugin-storybook": "^10.6.5",
|
|
219
215
|
"eslint-plugin-svelte": "^3.23.1",
|
|
220
|
-
"prettier-plugin-astro": "^1.1.
|
|
216
|
+
"prettier-plugin-astro": "^1.1.2",
|
|
221
217
|
"prettier-plugin-slidev": "^1.0.5",
|
|
222
|
-
"svelte-eslint-parser": "^1.
|
|
218
|
+
"svelte-eslint-parser": "^1.10.0"
|
|
223
219
|
};
|
|
224
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {};
|