Skip to content

Commit 72880a7

Browse files
committed
refactor(traverse): fix lint errors in codegen (#13186)
Fix lint errors in `oxc_traverse` codegen. It doesn't seem worthwhile adding descriptions to all properties of the type defs, since intention is to translate this codegen to Rust anyway. So just disable that rule.
1 parent 7fcc51e commit 72880a7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

crates/oxc_traverse/scripts/lib/parse.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// oxlint-disable eslint-plugin-jsdoc/require-property-description
2+
13
import { readFile } from 'fs/promises';
24
import { join as pathJoin } from 'path';
35
import { fileURLToPath } from 'url';
@@ -69,10 +71,10 @@ export default async function getTypesFromCode() {
6971
const codeDirPath = pathJoin(fileURLToPath(import.meta.url), '../../../../oxc_ast/src/ast/');
7072

7173
const types = Object.create(null);
72-
for (const filename of FILENAMES) {
74+
await Promise.all(FILENAMES.map(async (filename) => {
7375
const code = await readFile(`${codeDirPath}${filename}`, 'utf8');
7476
parseFile(code, filename, types);
75-
}
77+
}));
7678
return types;
7779
}
7880

@@ -109,7 +111,7 @@ class Lines {
109111
/**
110112
* @param {string[]} lines
111113
* @param {string} filename
112-
* @param {number} [offset=0]
114+
* @param {number} [offset]
113115
*/
114116
constructor(lines, filename, offset = 0) {
115117
/** @type {string[]} */

oxlintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"tasks/e2e/**", // TODO
2626
"napi/**", // TODO
2727
"editors/vscode/tests/**", // TODO,
28-
"crates/oxc_traverse/scripts/lib/parse.mjs", // TODO
2928
"tasks/lint_rules/src/oxlint-rules.mjs", // TODO
3029
"tasks/transform_conformance/update_fixtures.mjs", // TODO
3130
"tasks/lint_rules/src/main.mjs" // TODO

0 commit comments

Comments
 (0)