oxlint-harness 1.0.7 → 1.0.8
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/oxlint-runner.js +8 -0
- package/package.json +1 -1
package/dist/oxlint-runner.js
CHANGED
|
@@ -59,6 +59,14 @@ export class OxlintRunner {
|
|
|
59
59
|
// oxlint exits with non-zero when linting issues are found
|
|
60
60
|
// We still want to parse the JSON output
|
|
61
61
|
const diagnostics = this.parseOxlintOutput(stdout);
|
|
62
|
+
// If oxlint produced no diagnostics but exited with a code other than
|
|
63
|
+
// 0 (success) or 1 (lint violations found), treat it as a failure.
|
|
64
|
+
// This prevents tighten from wiping the suppression file when oxlint
|
|
65
|
+
// fails silently (e.g. missing tsconfig for --type-aware).
|
|
66
|
+
if (diagnostics.length === 0 && code !== 0 && code !== 1) {
|
|
67
|
+
reject(new Error(`oxlint exited with code ${code} and produced no output.\nStderr: ${stderr}`));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
62
70
|
resolve(diagnostics);
|
|
63
71
|
}
|
|
64
72
|
catch (error) {
|