@whoj/eslint-config 2.0.0 → 2.2.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/LICENSE +1 -1
- package/README.md +19 -19
- package/bin/index.js +1 -1
- package/dist/{chunk-ZBFF7OLB.js → chunk-5NT2OOQW.js} +99 -99
- package/dist/cli.js +126 -121
- package/dist/{dist-BE4MFJS4.js → dist-ZJ2E2ITJ.js} +49 -36
- package/dist/index.d.ts +185 -168
- package/dist/index.js +1726 -1666
- package/dist/{lib-7QWIUEWR.js → lib-C6BFP32Q.js} +232 -232
- package/dist/{lib-47EDT2ZH.js → lib-XQB7MXK6.js} +1 -1
- package/dist/{sass.node-CCXOXG7K.js → sass.node-L3JPZGSW.js} +2268 -1981
- package/package.json +14 -9
package/dist/cli.js
CHANGED
|
@@ -7,22 +7,115 @@ init_esm_shims();
|
|
|
7
7
|
|
|
8
8
|
// src/cli/index.ts
|
|
9
9
|
init_esm_shims();
|
|
10
|
+
import yargs from "yargs";
|
|
11
|
+
import c6 from "picocolors";
|
|
10
12
|
import process5 from "node:process";
|
|
11
13
|
import * as p5 from "@clack/prompts";
|
|
12
|
-
import c6 from "picocolors";
|
|
13
|
-
import yargs from "yargs";
|
|
14
14
|
import { hideBin } from "yargs/helpers";
|
|
15
15
|
|
|
16
|
-
// src/cli/
|
|
16
|
+
// src/cli/run.ts
|
|
17
|
+
init_esm_shims();
|
|
18
|
+
import fs3 from "node:fs";
|
|
19
|
+
import c5 from "picocolors";
|
|
20
|
+
import path4 from "node:path";
|
|
21
|
+
import process4 from "node:process";
|
|
22
|
+
import * as p4 from "@clack/prompts";
|
|
23
|
+
|
|
24
|
+
// src/cli/utils.ts
|
|
25
|
+
init_esm_shims();
|
|
26
|
+
import { execSync } from "node:child_process";
|
|
27
|
+
function isGitClean() {
|
|
28
|
+
try {
|
|
29
|
+
execSync("git diff-index --quiet HEAD --");
|
|
30
|
+
return true;
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function getEslintConfigContent(mainConfig, additionalConfigs) {
|
|
36
|
+
return `
|
|
37
|
+
import whoj from '@whoj/eslint-config'
|
|
38
|
+
|
|
39
|
+
export default whoj({
|
|
40
|
+
${mainConfig}
|
|
41
|
+
}${additionalConfigs?.map((config) => `,{
|
|
42
|
+
${config}
|
|
43
|
+
}`)})
|
|
44
|
+
`.trimStart();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/cli/stages/update-eslint-files.ts
|
|
17
48
|
init_esm_shims();
|
|
49
|
+
import fs from "node:fs";
|
|
18
50
|
import c from "picocolors";
|
|
51
|
+
import path from "node:path";
|
|
52
|
+
import fsp from "node:fs/promises";
|
|
53
|
+
import process from "node:process";
|
|
54
|
+
import * as p from "@clack/prompts";
|
|
55
|
+
import parse from "parse-gitignore";
|
|
56
|
+
async function updateEslintFiles(result) {
|
|
57
|
+
const cwd = process.cwd();
|
|
58
|
+
const pathESLintIgnore = path.join(cwd, ".eslintignore");
|
|
59
|
+
const pathPackageJSON = path.join(cwd, "package.json");
|
|
60
|
+
const pkgContent = await fsp.readFile(pathPackageJSON, "utf-8");
|
|
61
|
+
const pkg = JSON.parse(pkgContent);
|
|
62
|
+
const configFileName = pkg.type === "module" ? "eslint.config.js" : "eslint.config.mjs";
|
|
63
|
+
const pathFlatConfig = path.join(cwd, configFileName);
|
|
64
|
+
const eslintIgnores = [];
|
|
65
|
+
if (fs.existsSync(pathESLintIgnore)) {
|
|
66
|
+
p.log.step(c.cyan("Migrating existing .eslintignore"));
|
|
67
|
+
const content = await fsp.readFile(pathESLintIgnore, "utf-8");
|
|
68
|
+
const parsed = parse(content);
|
|
69
|
+
const globs = parsed.globs();
|
|
70
|
+
for (const glob of globs) {
|
|
71
|
+
if (glob.type === "ignore")
|
|
72
|
+
eslintIgnores.push(...glob.patterns);
|
|
73
|
+
else if (glob.type === "unignore")
|
|
74
|
+
eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const configLines = [];
|
|
78
|
+
if (eslintIgnores.length)
|
|
79
|
+
configLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);
|
|
80
|
+
if (result.extra.includes("formatter"))
|
|
81
|
+
configLines.push("formatters: true,");
|
|
82
|
+
if (result.extra.includes("unocss"))
|
|
83
|
+
configLines.push("unocss: true,");
|
|
84
|
+
for (const framework of result.frameworks)
|
|
85
|
+
configLines.push(`${framework}: true,`);
|
|
86
|
+
const mainConfig = configLines.map((i) => ` ${i}`).join("\n");
|
|
87
|
+
const additionalConfig = [];
|
|
88
|
+
const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
|
|
89
|
+
await fsp.writeFile(pathFlatConfig, eslintConfigContent);
|
|
90
|
+
p.log.success(c.green(`Created ${configFileName}`));
|
|
91
|
+
const files = fs.readdirSync(cwd);
|
|
92
|
+
const legacyConfig = [];
|
|
93
|
+
files.forEach((file) => {
|
|
94
|
+
if (/eslint|prettier/.test(file) && !/eslint\.config\./.test(file))
|
|
95
|
+
legacyConfig.push(file);
|
|
96
|
+
});
|
|
97
|
+
if (legacyConfig.length)
|
|
98
|
+
p.note(`${c.dim(legacyConfig.join(", "))}`, "You can now remove those files manually");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/cli/stages/update-package-json.ts
|
|
102
|
+
init_esm_shims();
|
|
103
|
+
import c3 from "picocolors";
|
|
104
|
+
import path2 from "node:path";
|
|
105
|
+
import fsp2 from "node:fs/promises";
|
|
106
|
+
import process2 from "node:process";
|
|
107
|
+
import * as p2 from "@clack/prompts";
|
|
108
|
+
|
|
109
|
+
// src/cli/constants.ts
|
|
110
|
+
init_esm_shims();
|
|
111
|
+
import c2 from "picocolors";
|
|
19
112
|
|
|
20
113
|
// package.json
|
|
21
114
|
var package_default = {
|
|
22
115
|
name: "@whoj/eslint-config",
|
|
23
116
|
type: "module",
|
|
24
|
-
version: "2.
|
|
25
|
-
packageManager: "pnpm@10.2.
|
|
117
|
+
version: "2.2.0",
|
|
118
|
+
packageManager: "pnpm@10.2.1",
|
|
26
119
|
description: "ESLint config",
|
|
27
120
|
license: "MIT",
|
|
28
121
|
homepage: "https://github.com/who-jonson/eslint-config",
|
|
@@ -46,6 +139,7 @@ var package_default = {
|
|
|
46
139
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
47
140
|
watch: "tsup --watch",
|
|
48
141
|
lint: "eslint .",
|
|
142
|
+
"lint:fix": "eslint . --fix",
|
|
49
143
|
typegen: "tsx scripts/typegen.ts",
|
|
50
144
|
prepack: "nr build",
|
|
51
145
|
release: "bumpp && pnpm publish",
|
|
@@ -54,12 +148,16 @@ var package_default = {
|
|
|
54
148
|
prepare: "simple-git-hooks"
|
|
55
149
|
},
|
|
56
150
|
peerDependencies: {
|
|
151
|
+
"@nuxt/eslint-config": "^1.0.1",
|
|
57
152
|
"@prettier/plugin-xml": "^3.4.1",
|
|
58
153
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
59
|
-
eslint: "^9.
|
|
154
|
+
eslint: "^9.19.0",
|
|
60
155
|
"eslint-plugin-format": ">=0.1.0"
|
|
61
156
|
},
|
|
62
157
|
peerDependenciesMeta: {
|
|
158
|
+
"@nuxt/eslint-config": {
|
|
159
|
+
optional: true
|
|
160
|
+
},
|
|
63
161
|
"@prettier/plugin-xml": {
|
|
64
162
|
optional: true
|
|
65
163
|
},
|
|
@@ -81,7 +179,7 @@ var package_default = {
|
|
|
81
179
|
"@stylistic/eslint-plugin": "^3.0.1",
|
|
82
180
|
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
83
181
|
"@typescript-eslint/parser": "^8.22.0",
|
|
84
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
182
|
+
"@vitest/eslint-plugin": "^1.1.26",
|
|
85
183
|
"eslint-config-flat-gitignore": "^2.0.0",
|
|
86
184
|
"eslint-flat-config-utils": "^2.0.1",
|
|
87
185
|
"eslint-merge-processors": "^1.0.0",
|
|
@@ -112,18 +210,18 @@ var package_default = {
|
|
|
112
210
|
},
|
|
113
211
|
devDependencies: {
|
|
114
212
|
"@antfu/ni": "^23.3.1",
|
|
115
|
-
"@eslint-react/eslint-plugin": "^1.26.
|
|
213
|
+
"@eslint-react/eslint-plugin": "^1.26.2",
|
|
116
214
|
"@eslint/config-inspector": "^1.0.0",
|
|
117
215
|
"@prettier/plugin-xml": "^3.4.1",
|
|
118
216
|
"@stylistic/eslint-plugin-migrate": "^3.0.1",
|
|
119
217
|
"@types/fs-extra": "^11.0.4",
|
|
120
|
-
"@types/node": "^22.13.
|
|
218
|
+
"@types/node": "^22.13.1",
|
|
121
219
|
"@types/prompts": "^2.4.9",
|
|
122
220
|
"@types/yargs": "^17.0.33",
|
|
123
221
|
"@unocss/eslint-plugin": "^65.4.3",
|
|
124
222
|
"@whoj/eslint-config": "workspace:*",
|
|
125
223
|
"astro-eslint-parser": "^1.2.1",
|
|
126
|
-
bumpp: "^10.0.
|
|
224
|
+
bumpp: "^10.0.2",
|
|
127
225
|
eslint: "^9.19.0",
|
|
128
226
|
"eslint-plugin-astro": "^1.3.1",
|
|
129
227
|
"eslint-plugin-format": "^1.0.1",
|
|
@@ -140,9 +238,9 @@ var package_default = {
|
|
|
140
238
|
"prettier-plugin-astro": "^0.14.1",
|
|
141
239
|
"prettier-plugin-slidev": "^1.0.5",
|
|
142
240
|
rimraf: "^6.0.1",
|
|
143
|
-
sass: "^1.
|
|
241
|
+
sass: "^1.84.0",
|
|
144
242
|
"simple-git-hooks": "^2.11.1",
|
|
145
|
-
svelte: "^5.19.
|
|
243
|
+
svelte: "^5.19.9",
|
|
146
244
|
"svelte-eslint-parser": "^0.43.0",
|
|
147
245
|
tsup: "^8.3.6",
|
|
148
246
|
tsx: "^4.19.2",
|
|
@@ -224,27 +322,27 @@ var vscodeSettingsString = `
|
|
|
224
322
|
`;
|
|
225
323
|
var frameworkOptions = [
|
|
226
324
|
{
|
|
227
|
-
label:
|
|
325
|
+
label: c2.green("Vue"),
|
|
228
326
|
value: "vue"
|
|
229
327
|
},
|
|
230
328
|
{
|
|
231
|
-
label:
|
|
329
|
+
label: c2.cyan("React"),
|
|
232
330
|
value: "react"
|
|
233
331
|
},
|
|
234
332
|
{
|
|
235
|
-
label:
|
|
333
|
+
label: c2.red("Svelte"),
|
|
236
334
|
value: "svelte"
|
|
237
335
|
},
|
|
238
336
|
{
|
|
239
|
-
label:
|
|
337
|
+
label: c2.magenta("Astro"),
|
|
240
338
|
value: "astro"
|
|
241
339
|
},
|
|
242
340
|
{
|
|
243
|
-
label:
|
|
341
|
+
label: c2.cyan("Solid"),
|
|
244
342
|
value: "solid"
|
|
245
343
|
},
|
|
246
344
|
{
|
|
247
|
-
label:
|
|
345
|
+
label: c2.blue("Slidev"),
|
|
248
346
|
value: "slidev"
|
|
249
347
|
}
|
|
250
348
|
];
|
|
@@ -252,11 +350,11 @@ var frameworks = frameworkOptions.map(({ value }) => value);
|
|
|
252
350
|
var extraOptions = [
|
|
253
351
|
{
|
|
254
352
|
hint: "Use external formatters (Prettier and/or dprint) to format files that ESLint cannot handle yet (.css, .html, etc)",
|
|
255
|
-
label:
|
|
353
|
+
label: c2.red("Formatter"),
|
|
256
354
|
value: "formatter"
|
|
257
355
|
},
|
|
258
356
|
{
|
|
259
|
-
label:
|
|
357
|
+
label: c2.cyan("UnoCSS"),
|
|
260
358
|
value: "unocss"
|
|
261
359
|
}
|
|
262
360
|
];
|
|
@@ -284,100 +382,7 @@ var dependenciesMap = {
|
|
|
284
382
|
vue: []
|
|
285
383
|
};
|
|
286
384
|
|
|
287
|
-
// src/cli/run.ts
|
|
288
|
-
init_esm_shims();
|
|
289
|
-
import fs3 from "node:fs";
|
|
290
|
-
import path4 from "node:path";
|
|
291
|
-
import process4 from "node:process";
|
|
292
|
-
import * as p4 from "@clack/prompts";
|
|
293
|
-
import c5 from "picocolors";
|
|
294
|
-
|
|
295
|
-
// src/cli/stages/update-eslint-files.ts
|
|
296
|
-
init_esm_shims();
|
|
297
|
-
import fs from "node:fs";
|
|
298
|
-
import fsp from "node:fs/promises";
|
|
299
|
-
import path from "node:path";
|
|
300
|
-
import process from "node:process";
|
|
301
|
-
import * as p from "@clack/prompts";
|
|
302
|
-
import parse from "parse-gitignore";
|
|
303
|
-
import c2 from "picocolors";
|
|
304
|
-
|
|
305
|
-
// src/cli/utils.ts
|
|
306
|
-
init_esm_shims();
|
|
307
|
-
import { execSync } from "node:child_process";
|
|
308
|
-
function isGitClean() {
|
|
309
|
-
try {
|
|
310
|
-
execSync("git diff-index --quiet HEAD --");
|
|
311
|
-
return true;
|
|
312
|
-
} catch {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function getEslintConfigContent(mainConfig, additionalConfigs) {
|
|
317
|
-
return `
|
|
318
|
-
import whoj from '@whoj/eslint-config'
|
|
319
|
-
|
|
320
|
-
export default whoj({
|
|
321
|
-
${mainConfig}
|
|
322
|
-
}${additionalConfigs?.map((config) => `,{
|
|
323
|
-
${config}
|
|
324
|
-
}`)})
|
|
325
|
-
`.trimStart();
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// src/cli/stages/update-eslint-files.ts
|
|
329
|
-
async function updateEslintFiles(result) {
|
|
330
|
-
const cwd = process.cwd();
|
|
331
|
-
const pathESLintIgnore = path.join(cwd, ".eslintignore");
|
|
332
|
-
const pathPackageJSON = path.join(cwd, "package.json");
|
|
333
|
-
const pkgContent = await fsp.readFile(pathPackageJSON, "utf-8");
|
|
334
|
-
const pkg = JSON.parse(pkgContent);
|
|
335
|
-
const configFileName = pkg.type === "module" ? "eslint.config.js" : "eslint.config.mjs";
|
|
336
|
-
const pathFlatConfig = path.join(cwd, configFileName);
|
|
337
|
-
const eslintIgnores = [];
|
|
338
|
-
if (fs.existsSync(pathESLintIgnore)) {
|
|
339
|
-
p.log.step(c2.cyan(`Migrating existing .eslintignore`));
|
|
340
|
-
const content = await fsp.readFile(pathESLintIgnore, "utf-8");
|
|
341
|
-
const parsed = parse(content);
|
|
342
|
-
const globs = parsed.globs();
|
|
343
|
-
for (const glob of globs) {
|
|
344
|
-
if (glob.type === "ignore")
|
|
345
|
-
eslintIgnores.push(...glob.patterns);
|
|
346
|
-
else if (glob.type === "unignore")
|
|
347
|
-
eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
const configLines = [];
|
|
351
|
-
if (eslintIgnores.length)
|
|
352
|
-
configLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);
|
|
353
|
-
if (result.extra.includes("formatter"))
|
|
354
|
-
configLines.push(`formatters: true,`);
|
|
355
|
-
if (result.extra.includes("unocss"))
|
|
356
|
-
configLines.push(`unocss: true,`);
|
|
357
|
-
for (const framework of result.frameworks)
|
|
358
|
-
configLines.push(`${framework}: true,`);
|
|
359
|
-
const mainConfig = configLines.map((i) => ` ${i}`).join("\n");
|
|
360
|
-
const additionalConfig = [];
|
|
361
|
-
const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
|
|
362
|
-
await fsp.writeFile(pathFlatConfig, eslintConfigContent);
|
|
363
|
-
p.log.success(c2.green(`Created ${configFileName}`));
|
|
364
|
-
const files = fs.readdirSync(cwd);
|
|
365
|
-
const legacyConfig = [];
|
|
366
|
-
files.forEach((file) => {
|
|
367
|
-
if (/eslint|prettier/.test(file) && !/eslint\.config\./.test(file))
|
|
368
|
-
legacyConfig.push(file);
|
|
369
|
-
});
|
|
370
|
-
if (legacyConfig.length)
|
|
371
|
-
p.note(`${c2.dim(legacyConfig.join(", "))}`, "You can now remove those files manually");
|
|
372
|
-
}
|
|
373
|
-
|
|
374
385
|
// src/cli/stages/update-package-json.ts
|
|
375
|
-
init_esm_shims();
|
|
376
|
-
import fsp2 from "node:fs/promises";
|
|
377
|
-
import path2 from "node:path";
|
|
378
|
-
import process2 from "node:process";
|
|
379
|
-
import * as p2 from "@clack/prompts";
|
|
380
|
-
import c3 from "picocolors";
|
|
381
386
|
async function updatePackageJson(result) {
|
|
382
387
|
const cwd = process2.cwd();
|
|
383
388
|
const pathPackageJSON = path2.join(cwd, "package.json");
|
|
@@ -425,17 +430,17 @@ async function updatePackageJson(result) {
|
|
|
425
430
|
if (addedPackages.length)
|
|
426
431
|
p2.note(`${c3.dim(addedPackages.join(", "))}`, "Added packages");
|
|
427
432
|
await fsp2.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
|
|
428
|
-
p2.log.success(c3.green(
|
|
433
|
+
p2.log.success(c3.green("Changes wrote to package.json"));
|
|
429
434
|
}
|
|
430
435
|
|
|
431
436
|
// src/cli/stages/update-vscode-settings.ts
|
|
432
437
|
init_esm_shims();
|
|
433
438
|
import fs2 from "node:fs";
|
|
434
|
-
import
|
|
439
|
+
import c4 from "picocolors";
|
|
435
440
|
import path3 from "node:path";
|
|
441
|
+
import fsp3 from "node:fs/promises";
|
|
436
442
|
import process3 from "node:process";
|
|
437
443
|
import * as p3 from "@clack/prompts";
|
|
438
|
-
import c4 from "picocolors";
|
|
439
444
|
async function updateVscodeSettings(result) {
|
|
440
445
|
const cwd = process3.cwd();
|
|
441
446
|
if (!result.updateVscodeSettings)
|
|
@@ -447,7 +452,7 @@ async function updateVscodeSettings(result) {
|
|
|
447
452
|
if (!fs2.existsSync(settingsPath)) {
|
|
448
453
|
await fsp3.writeFile(settingsPath, `{${vscodeSettingsString}}
|
|
449
454
|
`, "utf-8");
|
|
450
|
-
p3.log.success(c4.green(
|
|
455
|
+
p3.log.success(c4.green("Created .vscode/settings.json"));
|
|
451
456
|
} else {
|
|
452
457
|
let settingsContent = await fsp3.readFile(settingsPath, "utf8");
|
|
453
458
|
settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
|
|
@@ -455,7 +460,7 @@ async function updateVscodeSettings(result) {
|
|
|
455
460
|
settingsContent += `${vscodeSettingsString}}
|
|
456
461
|
`;
|
|
457
462
|
await fsp3.writeFile(settingsPath, settingsContent, "utf-8");
|
|
458
|
-
p3.log.success(c4.green(
|
|
463
|
+
p3.log.success(c4.green("Updated .vscode/settings.json"));
|
|
459
464
|
}
|
|
460
465
|
}
|
|
461
466
|
|
|
@@ -465,7 +470,7 @@ async function run(options = {}) {
|
|
|
465
470
|
const argTemplate = options.frameworks?.map((m) => m.trim());
|
|
466
471
|
const argExtra = options.extra?.map((m) => m.trim());
|
|
467
472
|
if (fs3.existsSync(path4.join(process4.cwd(), "eslint.config.js"))) {
|
|
468
|
-
p4.log.warn(c5.yellow(
|
|
473
|
+
p4.log.warn(c5.yellow("eslint.config.js already exists, migration wizard exited."));
|
|
469
474
|
return process4.exit(1);
|
|
470
475
|
}
|
|
471
476
|
let result = {
|
|
@@ -526,7 +531,7 @@ async function run(options = {}) {
|
|
|
526
531
|
await updatePackageJson(result);
|
|
527
532
|
await updateEslintFiles(result);
|
|
528
533
|
await updateVscodeSettings(result);
|
|
529
|
-
p4.log.success(c5.green(
|
|
534
|
+
p4.log.success(c5.green("Setup completed"));
|
|
530
535
|
p4.outro(`Now you can update the dependencies by run ${c5.blue("pnpm install")} and run ${c5.blue("eslint . --fix")}
|
|
531
536
|
`);
|
|
532
537
|
}
|
|
@@ -534,7 +539,7 @@ async function run(options = {}) {
|
|
|
534
539
|
// src/cli/index.ts
|
|
535
540
|
function header() {
|
|
536
541
|
console.log("\n");
|
|
537
|
-
p5.intro(`${c6.green(
|
|
542
|
+
p5.intro(`${c6.green("@whoj/eslint-config ")}${c6.dim(`v${package_default.version}`)}`);
|
|
538
543
|
}
|
|
539
544
|
var instance = yargs(hideBin(process5.argv)).scriptName("@whoj/eslint-config").usage("").command(
|
|
540
545
|
"*",
|
|
@@ -12968,19 +12968,19 @@ var require_dist6 = __commonJS({
|
|
|
12968
12968
|
}
|
|
12969
12969
|
});
|
|
12970
12970
|
|
|
12971
|
-
// node_modules/.pnpm/@eslint-react+eslint-plugin@1.26.
|
|
12971
|
+
// node_modules/.pnpm/@eslint-react+eslint-plugin@1.26.2_eslint@9.19.0_jiti@2.4.2__ts-api-utils@2.0.1_typescript@5.7.3__typescript@5.7.3/node_modules/@eslint-react/eslint-plugin/dist/index.mjs
|
|
12972
12972
|
init_esm_shims();
|
|
12973
12973
|
|
|
12974
|
-
// node_modules/.pnpm/eslint-plugin-react-debug@1.26.
|
|
12974
|
+
// node_modules/.pnpm/eslint-plugin-react-debug@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-debug/dist/index.mjs
|
|
12975
12975
|
init_esm_shims();
|
|
12976
12976
|
|
|
12977
|
-
// node_modules/.pnpm/@eslint-react+core@1.26.
|
|
12977
|
+
// node_modules/.pnpm/@eslint-react+core@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/core/dist/index.mjs
|
|
12978
12978
|
init_esm_shims();
|
|
12979
12979
|
|
|
12980
|
-
// node_modules/.pnpm/@eslint-react+ast@1.26.
|
|
12980
|
+
// node_modules/.pnpm/@eslint-react+ast@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/ast/dist/index.mjs
|
|
12981
12981
|
init_esm_shims();
|
|
12982
12982
|
|
|
12983
|
-
// node_modules/.pnpm/@eslint-react+eff@1.26.
|
|
12983
|
+
// node_modules/.pnpm/@eslint-react+eff@1.26.2/node_modules/@eslint-react/eff/dist/index.mjs
|
|
12984
12984
|
init_esm_shims();
|
|
12985
12985
|
var _ = void 0;
|
|
12986
12986
|
function identity(x2) {
|
|
@@ -13065,7 +13065,7 @@ function getOrUpdate(map, key, callback) {
|
|
|
13065
13065
|
return value;
|
|
13066
13066
|
}
|
|
13067
13067
|
|
|
13068
|
-
// node_modules/.pnpm/@eslint-react+ast@1.26.
|
|
13068
|
+
// node_modules/.pnpm/@eslint-react+ast@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/ast/dist/index.mjs
|
|
13069
13069
|
var import_types = __toESM(require_dist(), 1);
|
|
13070
13070
|
var import_utils = __toESM(require_dist4(), 1);
|
|
13071
13071
|
var import_typescript_estree = __toESM(require_dist5(), 1);
|
|
@@ -13414,7 +13414,7 @@ function snakeCase(str) {
|
|
|
13414
13414
|
return toLowerCase(delimiterCase(removeApostrophe(str), "_"));
|
|
13415
13415
|
}
|
|
13416
13416
|
|
|
13417
|
-
// node_modules/.pnpm/@eslint-react+ast@1.26.
|
|
13417
|
+
// node_modules/.pnpm/@eslint-react+ast@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/ast/dist/index.mjs
|
|
13418
13418
|
function findParentNode(node, test) {
|
|
13419
13419
|
if (node == null) return _;
|
|
13420
13420
|
let parent = node.parent;
|
|
@@ -13990,11 +13990,11 @@ function unwrapTypeExpression(node) {
|
|
|
13990
13990
|
return node;
|
|
13991
13991
|
}
|
|
13992
13992
|
|
|
13993
|
-
// node_modules/.pnpm/@eslint-react+jsx@1.26.
|
|
13993
|
+
// node_modules/.pnpm/@eslint-react+jsx@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/jsx/dist/index.mjs
|
|
13994
13994
|
init_esm_shims();
|
|
13995
13995
|
var import_types3 = __toESM(require_dist(), 1);
|
|
13996
13996
|
|
|
13997
|
-
// node_modules/.pnpm/@eslint-react+var@1.26.
|
|
13997
|
+
// node_modules/.pnpm/@eslint-react+var@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/var/dist/index.mjs
|
|
13998
13998
|
init_esm_shims();
|
|
13999
13999
|
var import_types2 = __toESM(require_dist(), 1);
|
|
14000
14000
|
var ASTUtils2 = __toESM(require_ast_utils(), 1);
|
|
@@ -14268,7 +14268,7 @@ function getValueConstruction(node, initialScope, hint = ValueConstructionHint.N
|
|
|
14268
14268
|
}
|
|
14269
14269
|
}
|
|
14270
14270
|
|
|
14271
|
-
// node_modules/.pnpm/@eslint-react+jsx@1.26.
|
|
14271
|
+
// node_modules/.pnpm/@eslint-react+jsx@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/jsx/dist/index.mjs
|
|
14272
14272
|
function findParentAttribute(node, test = constTrue) {
|
|
14273
14273
|
const guard = (node2) => {
|
|
14274
14274
|
return node2.type === import_types3.AST_NODE_TYPES.JSXAttribute && test(node2);
|
|
@@ -14496,7 +14496,7 @@ function isPaddingSpaces(node) {
|
|
|
14496
14496
|
return isLiteral(node) && isWhiteSpace(node) && node.raw.includes("\n");
|
|
14497
14497
|
}
|
|
14498
14498
|
|
|
14499
|
-
// node_modules/.pnpm/@eslint-react+shared@1.26.
|
|
14499
|
+
// node_modules/.pnpm/@eslint-react+shared@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/shared/dist/index.mjs
|
|
14500
14500
|
init_esm_shims();
|
|
14501
14501
|
var import_utils2 = __toESM(require_dist4(), 1);
|
|
14502
14502
|
import module from "node:module";
|
|
@@ -14622,6 +14622,16 @@ var ValiError = class extends Error {
|
|
|
14622
14622
|
}
|
|
14623
14623
|
};
|
|
14624
14624
|
// @__NO_SIDE_EFFECTS__
|
|
14625
|
+
function getFallback(schema4, dataset, config2) {
|
|
14626
|
+
return typeof schema4.fallback === "function" ? (
|
|
14627
|
+
// @ts-expect-error
|
|
14628
|
+
schema4.fallback(dataset, config2)
|
|
14629
|
+
) : (
|
|
14630
|
+
// @ts-expect-error
|
|
14631
|
+
schema4.fallback
|
|
14632
|
+
);
|
|
14633
|
+
}
|
|
14634
|
+
// @__NO_SIDE_EFFECTS__
|
|
14625
14635
|
function getDefault(schema4, dataset, config2) {
|
|
14626
14636
|
return typeof schema4.default === "function" ? (
|
|
14627
14637
|
// @ts-expect-error
|
|
@@ -14765,6 +14775,8 @@ function object(entries, message) {
|
|
|
14765
14775
|
dataset.typed = false;
|
|
14766
14776
|
}
|
|
14767
14777
|
dataset.value[key] = valueDataset.value;
|
|
14778
|
+
} else if (valueSchema.fallback !== void 0) {
|
|
14779
|
+
dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
14768
14780
|
} else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
14769
14781
|
_addIssue(this, "key", dataset, config2, {
|
|
14770
14782
|
input: void 0,
|
|
@@ -15736,7 +15748,7 @@ function getSettingsFromContext(context) {
|
|
|
15736
15748
|
return toNormalizedSettings(decodeSettings(context.settings));
|
|
15737
15749
|
}
|
|
15738
15750
|
|
|
15739
|
-
// node_modules/.pnpm/@eslint-react+core@1.26.
|
|
15751
|
+
// node_modules/.pnpm/@eslint-react+core@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/core/dist/index.mjs
|
|
15740
15752
|
var import_types4 = __toESM(require_dist(), 1);
|
|
15741
15753
|
|
|
15742
15754
|
// node_modules/.pnpm/birecord@0.1.1/node_modules/birecord/dist/mod.mjs
|
|
@@ -15762,7 +15774,7 @@ function reverse(record) {
|
|
|
15762
15774
|
);
|
|
15763
15775
|
}
|
|
15764
15776
|
|
|
15765
|
-
// node_modules/.pnpm/@eslint-react+core@1.26.
|
|
15777
|
+
// node_modules/.pnpm/@eslint-react+core@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/@eslint-react/core/dist/index.mjs
|
|
15766
15778
|
function isInitializedFromReact(name14, importSource, initialScope) {
|
|
15767
15779
|
return name14.toLowerCase() === "react" || isInitializedFromSource(
|
|
15768
15780
|
name14,
|
|
@@ -16360,10 +16372,10 @@ function isFunctionOfUseEffectCleanup(node) {
|
|
|
16360
16372
|
return nearFunction === nearFunctionOfReturn && isFunctionOfUseEffectSetup(nearFunction);
|
|
16361
16373
|
}
|
|
16362
16374
|
|
|
16363
|
-
// node_modules/.pnpm/eslint-plugin-react-debug@1.26.
|
|
16375
|
+
// node_modules/.pnpm/eslint-plugin-react-debug@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-debug/dist/index.mjs
|
|
16364
16376
|
var import_utils3 = __toESM(require_dist4(), 1);
|
|
16365
16377
|
var name = "eslint-plugin-react-debug";
|
|
16366
|
-
var version = "1.26.
|
|
16378
|
+
var version = "1.26.2";
|
|
16367
16379
|
var createRule = createRuleForPlugin("debug");
|
|
16368
16380
|
var RULE_NAME = "class-component";
|
|
16369
16381
|
var RULE_FEATURES = [
|
|
@@ -16561,7 +16573,7 @@ var index_default = {
|
|
|
16561
16573
|
}
|
|
16562
16574
|
};
|
|
16563
16575
|
|
|
16564
|
-
// node_modules/.pnpm/eslint-plugin-react-dom@1.26.
|
|
16576
|
+
// node_modules/.pnpm/eslint-plugin-react-dom@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-dom/dist/index.mjs
|
|
16565
16577
|
init_esm_shims();
|
|
16566
16578
|
var import_types5 = __toESM(require_dist(), 1);
|
|
16567
16579
|
|
|
@@ -16654,9 +16666,9 @@ var assertValidOperator = (op) => {
|
|
|
16654
16666
|
}
|
|
16655
16667
|
};
|
|
16656
16668
|
|
|
16657
|
-
// node_modules/.pnpm/eslint-plugin-react-dom@1.26.
|
|
16669
|
+
// node_modules/.pnpm/eslint-plugin-react-dom@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-dom/dist/index.mjs
|
|
16658
16670
|
var name2 = "eslint-plugin-react-dom";
|
|
16659
|
-
var version2 = "1.26.
|
|
16671
|
+
var version2 = "1.26.2";
|
|
16660
16672
|
var createRule2 = createRuleForPlugin("dom");
|
|
16661
16673
|
function findCustomComponent(name23, components) {
|
|
16662
16674
|
return components.findLast((c2) => c2.name === name23 || c2.re.test(name23));
|
|
@@ -18360,11 +18372,11 @@ var index_default2 = {
|
|
|
18360
18372
|
}
|
|
18361
18373
|
};
|
|
18362
18374
|
|
|
18363
|
-
// node_modules/.pnpm/eslint-plugin-react-hooks-extra@1.26.
|
|
18375
|
+
// node_modules/.pnpm/eslint-plugin-react-hooks-extra@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-hooks-extra/dist/index.mjs
|
|
18364
18376
|
init_esm_shims();
|
|
18365
18377
|
var import_types6 = __toESM(require_dist(), 1);
|
|
18366
18378
|
var name3 = "eslint-plugin-react-hooks-extra";
|
|
18367
|
-
var version3 = "1.26.
|
|
18379
|
+
var version3 = "1.26.2";
|
|
18368
18380
|
var createRule3 = createRuleForPlugin("hooks-extra");
|
|
18369
18381
|
function isFromHookCall(name23, context, settings4, predicate = constTrue) {
|
|
18370
18382
|
const hookAlias = settings4.additionalHooks[name23] ?? [];
|
|
@@ -19145,12 +19157,12 @@ var index_default3 = {
|
|
|
19145
19157
|
}
|
|
19146
19158
|
};
|
|
19147
19159
|
|
|
19148
|
-
// node_modules/.pnpm/eslint-plugin-react-naming-convention@1.26.
|
|
19160
|
+
// node_modules/.pnpm/eslint-plugin-react-naming-convention@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-naming-convention/dist/index.mjs
|
|
19149
19161
|
init_esm_shims();
|
|
19150
19162
|
import path from "node:path";
|
|
19151
19163
|
var import_types7 = __toESM(require_dist(), 1);
|
|
19152
19164
|
var name4 = "eslint-plugin-react-naming-convention";
|
|
19153
|
-
var version4 = "1.26.
|
|
19165
|
+
var version4 = "1.26.2";
|
|
19154
19166
|
var createRule4 = createRuleForPlugin("naming-convention");
|
|
19155
19167
|
var RULE_NAME14 = "component-name";
|
|
19156
19168
|
var defaultOptions = [
|
|
@@ -19565,12 +19577,12 @@ var index_default4 = {
|
|
|
19565
19577
|
}
|
|
19566
19578
|
};
|
|
19567
19579
|
|
|
19568
|
-
// node_modules/.pnpm/eslint-plugin-react-web-api@1.26.
|
|
19580
|
+
// node_modules/.pnpm/eslint-plugin-react-web-api@1.26.2_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/eslint-plugin-react-web-api/dist/index.mjs
|
|
19569
19581
|
init_esm_shims();
|
|
19570
19582
|
var import_utils5 = __toESM(require_dist4(), 1);
|
|
19571
19583
|
var import_types8 = __toESM(require_dist(), 1);
|
|
19572
19584
|
var name5 = "eslint-plugin-react-web-api";
|
|
19573
|
-
var version5 = "1.26.
|
|
19585
|
+
var version5 = "1.26.2";
|
|
19574
19586
|
var createRule5 = createRuleForPlugin("web-api");
|
|
19575
19587
|
function getInstanceID(node, prev) {
|
|
19576
19588
|
switch (true) {
|
|
@@ -20250,7 +20262,7 @@ var index_default5 = {
|
|
|
20250
20262
|
}
|
|
20251
20263
|
};
|
|
20252
20264
|
|
|
20253
|
-
// node_modules/.pnpm/eslint-plugin-react-x@1.26.
|
|
20265
|
+
// node_modules/.pnpm/eslint-plugin-react-x@1.26.2_eslint@9.19.0_jiti@2.4.2__ts-api-utils@2.0.1_typescript@5.7.3__typescript@5.7.3/node_modules/eslint-plugin-react-x/dist/index.mjs
|
|
20254
20266
|
init_esm_shims();
|
|
20255
20267
|
var import_types9 = __toESM(require_dist(), 1);
|
|
20256
20268
|
var import_type_utils2 = __toESM(require_dist6(), 1);
|
|
@@ -20504,7 +20516,7 @@ function isReadonlyPropertyIntersection(type, name14, typeChecker) {
|
|
|
20504
20516
|
});
|
|
20505
20517
|
}
|
|
20506
20518
|
|
|
20507
|
-
// node_modules/.pnpm/eslint-plugin-react-x@1.26.
|
|
20519
|
+
// node_modules/.pnpm/eslint-plugin-react-x@1.26.2_eslint@9.19.0_jiti@2.4.2__ts-api-utils@2.0.1_typescript@5.7.3__typescript@5.7.3/node_modules/eslint-plugin-react-x/dist/index.mjs
|
|
20508
20520
|
var import_typescript4 = __toESM(require_typescript(), 1);
|
|
20509
20521
|
|
|
20510
20522
|
// node_modules/.pnpm/is-immutable-type@5.0.1_eslint@9.19.0_jiti@2.4.2__typescript@5.7.3/node_modules/is-immutable-type/dist/index.mjs
|
|
@@ -22458,9 +22470,9 @@ function createIndexSignatureTaskStates(parameters, m_state, kind, typeData) {
|
|
|
22458
22470
|
return [];
|
|
22459
22471
|
}
|
|
22460
22472
|
|
|
22461
|
-
// node_modules/.pnpm/eslint-plugin-react-x@1.26.
|
|
22473
|
+
// node_modules/.pnpm/eslint-plugin-react-x@1.26.2_eslint@9.19.0_jiti@2.4.2__ts-api-utils@2.0.1_typescript@5.7.3__typescript@5.7.3/node_modules/eslint-plugin-react-x/dist/index.mjs
|
|
22462
22474
|
var name6 = "eslint-plugin-react-x";
|
|
22463
|
-
var version6 = "1.26.
|
|
22475
|
+
var version6 = "1.26.2";
|
|
22464
22476
|
var createRule6 = createRuleForPlugin("x");
|
|
22465
22477
|
function getAssociatedTokens(context, node) {
|
|
22466
22478
|
{
|
|
@@ -23424,7 +23436,7 @@ var no_context_provider_default = createRule6({
|
|
|
23424
23436
|
},
|
|
23425
23437
|
fixable: "code",
|
|
23426
23438
|
messages: {
|
|
23427
|
-
noContextProvider: "In React 19, you can render '<
|
|
23439
|
+
noContextProvider: "In React 19, you can render '<{{contextName}}>' as a provider instead of '<{{contextName}}.Provider>'."
|
|
23428
23440
|
},
|
|
23429
23441
|
schema: []
|
|
23430
23442
|
},
|
|
@@ -23437,15 +23449,16 @@ var no_context_provider_default = createRule6({
|
|
|
23437
23449
|
}
|
|
23438
23450
|
return {
|
|
23439
23451
|
JSXElement(node) {
|
|
23440
|
-
const
|
|
23441
|
-
if (
|
|
23442
|
-
|
|
23443
|
-
}
|
|
23452
|
+
const [name23, ...rest] = getElementName(node).split(".").reverse();
|
|
23453
|
+
if (name23 !== "Provider") return;
|
|
23454
|
+
const contextName = rest.reverse().join(".");
|
|
23444
23455
|
context.report({
|
|
23445
23456
|
messageId: "noContextProvider",
|
|
23446
23457
|
node,
|
|
23458
|
+
data: {
|
|
23459
|
+
contextName
|
|
23460
|
+
},
|
|
23447
23461
|
fix(fixer) {
|
|
23448
|
-
const contextName = elementName.replace(/\.Provider$/, "");
|
|
23449
23462
|
const openingElement = node.openingElement;
|
|
23450
23463
|
const closingElement = node.closingElement;
|
|
23451
23464
|
if (closingElement == null) {
|
|
@@ -25810,14 +25823,14 @@ var index_default6 = {
|
|
|
25810
25823
|
}
|
|
25811
25824
|
};
|
|
25812
25825
|
|
|
25813
|
-
// node_modules/.pnpm/@eslint-react+eslint-plugin@1.26.
|
|
25826
|
+
// node_modules/.pnpm/@eslint-react+eslint-plugin@1.26.2_eslint@9.19.0_jiti@2.4.2__ts-api-utils@2.0.1_typescript@5.7.3__typescript@5.7.3/node_modules/@eslint-react/eslint-plugin/dist/index.mjs
|
|
25814
25827
|
var __defProp = Object.defineProperty;
|
|
25815
25828
|
var __export = (target, all) => {
|
|
25816
25829
|
for (var name14 in all)
|
|
25817
25830
|
__defProp(target, name14, { get: all[name14], enumerable: true });
|
|
25818
25831
|
};
|
|
25819
25832
|
var name7 = "@eslint-react/eslint-plugin";
|
|
25820
|
-
var version7 = "1.26.
|
|
25833
|
+
var version7 = "1.26.2";
|
|
25821
25834
|
var all_exports = {};
|
|
25822
25835
|
__export(all_exports, {
|
|
25823
25836
|
name: () => name42,
|