lintmax 0.1.95 → 0.1.96
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.mjs +3 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1446,7 +1446,8 @@ const rebuildBiomeLine = ({ line, rules }) => {
|
|
|
1446
1446
|
const requireLintAnswer = ({ exitCode, label, stderr, stdout }) => {
|
|
1447
1447
|
const json = extractJson(stdout);
|
|
1448
1448
|
const refuse = (why) => {
|
|
1449
|
-
|
|
1449
|
+
const said = [stderr.trim(), stdout.trim()].filter((part) => part !== "").join(" | ");
|
|
1450
|
+
throw new Error(`${label}: ${why} (exit ${exitCode}). Refusing rather than reading it as "nothing fired", which would report every directive unused. ${said.slice(0, 600)}`);
|
|
1450
1451
|
};
|
|
1451
1452
|
let parsed;
|
|
1452
1453
|
try {
|
|
@@ -1458,6 +1459,7 @@ const requireLintAnswer = ({ exitCode, label, stderr, stdout }) => {
|
|
|
1458
1459
|
return json;
|
|
1459
1460
|
};
|
|
1460
1461
|
const firedOxlintByFile = async ({ configPath, files, oxlintBin }) => {
|
|
1462
|
+
if (!await file(configPath).exists()) throw new Error(`oxlint-unused: the generated config is absent at ${configPath}, so no rule can fire and every directive would read as unused. The stage that writes it did not run.`);
|
|
1461
1463
|
const result = await runCapture({
|
|
1462
1464
|
args: [
|
|
1463
1465
|
oxlintBin,
|