Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

Commit d65c72f

Browse files
committed
Fix lint-cli helper docs and shadowing
The async engine helper missed its own JSDoc block and shadowed the outer resolver. Caught by dogfood ag-lint run.
1 parent efae1fd commit d65c72f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎packages/oxlint-config/src/lint-cli.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ are unchanged; like ESLint's cache it does not track other files a rule reads.
5050
`;
5151

5252
/**
53-
* List the files Oxlint would lint, using its own ignore and extension handling.
54-
* @param oxlint - Oxlint Node entry point.
55-
* @param plan - Shareable options and targets.
53+
* Run the engine once and capture bounded standard output.
54+
* @param args - Engine executable and arguments.
5655
* @param cwd - Consumer working directory.
57-
* @returns Relative filenames, or none when discovery is not reproducible.
56+
* @param maxBuffer - Maximum retained output bytes.
57+
* @returns Exit status and captured output, or empty output past the bound.
5858
*/
5959
function runEngine(args: string[], cwd: string, maxBuffer: number): Promise<{ status: number | null; stdout: string }> {
60-
return new Promise((resolve, reject) => {
60+
return new Promise((settle, reject) => {
6161
const child = spawn(process.execPath, args, { cwd, stdio: ['ignore', 'pipe', 'ignore'] });
6262
let stdout = '';
6363
let length = 0;
@@ -68,7 +68,7 @@ function runEngine(args: string[], cwd: string, maxBuffer: number): Promise<{ st
6868
}
6969
});
7070
child.on('error', reject);
71-
child.on('close', (status) => resolve({ status, stdout: length <= maxBuffer ? stdout : '' }));
71+
child.on('close', (status) => settle({ status, stdout: length <= maxBuffer ? stdout : '' }));
7272
});
7373
}
7474

0 commit comments

Comments
 (0)