Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions napi/oxlint2/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ async function main() {
const linter = new Linter();

const success = await linter.run();
if (!success) {
process.exit(1);
}

// Note: It's recommended to set `process.exitCode` instead of calling `process.exit()`.
// `process.exit()` kills the process immediately and `stdout` may not be flushed before process dies.
// https://nodejs.org/api/process.html#processexitcode
if (!success) process.exitCode = 1;
}

main();
Loading