diff --git a/napi/oxlint2/src-js/index.js b/napi/oxlint2/src-js/index.ts similarity index 99% rename from napi/oxlint2/src-js/index.js rename to napi/oxlint2/src-js/index.ts index 7cf897995f968..54484994a8d96 100644 --- a/napi/oxlint2/src-js/index.js +++ b/napi/oxlint2/src-js/index.ts @@ -222,6 +222,7 @@ function lintFile([filePath, bufferId, buffer, ruleIds]) { // -------------------- // Call Rust, passing `loadPlugin` and `lintFile` as callbacks +// @ts-expect-error const success = await lint(loadPlugin, lintFile); // Note: It's recommended to set `process.exitCode` instead of calling `process.exit()`. diff --git a/napi/oxlint2/src-js/utils.js b/napi/oxlint2/src-js/utils.ts similarity index 100% rename from napi/oxlint2/src-js/utils.js rename to napi/oxlint2/src-js/utils.ts diff --git a/napi/oxlint2/src-js/visitor.js b/napi/oxlint2/src-js/visitor.ts similarity index 99% rename from napi/oxlint2/src-js/visitor.js rename to napi/oxlint2/src-js/visitor.ts index 0e814fa14d781..801a2b218ff97 100644 --- a/napi/oxlint2/src-js/visitor.js +++ b/napi/oxlint2/src-js/visitor.ts @@ -341,6 +341,7 @@ function mergeVisitFns(visitFns) { } else { merger = mergers[numVisitFns]; if (merger === null) { + // @ts-expect-error merger = mergers[numVisitFns] = createMerger(numVisitFns); } } diff --git a/napi/oxlint2/tsdown.config.ts b/napi/oxlint2/tsdown.config.ts index 9bc3d0edf7443..eec0a7548820f 100644 --- a/napi/oxlint2/tsdown.config.ts +++ b/napi/oxlint2/tsdown.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsdown'; export default defineConfig({ - entry: ['src-js/index.js'], + entry: ['src-js/index.ts'], format: ['esm'], platform: 'node', target: 'node20',