Skip to content

Commit 3c46139

Browse files
committed
delete getExternalRuleOptions()
1 parent 48919f3 commit 3c46139

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

apps/oxlint/src-js/bindings.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
/* auto-generated by NAPI-RS */
22
/* eslint-disable */
3-
/**
4-
* JS callable function to retrieve the serialized external rule options.
5-
* Returns a JSON string of options arrays. Called once from JS after creating the external linter.
6-
*/
7-
export declare function getExternalRuleOptions(): string | null
8-
93
/** JS callback to lint a file. */
104
export type JsLintFileCb =
115
((arg0: string, arg1: number, arg2: Uint8Array | undefined | null, arg3: Array<number>, arg4: Array<number>, arg5: string) => string)

apps/oxlint/src-js/bindings.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,5 @@ if (!nativeBinding) {
575575
throw new Error(`Failed to load native binding`)
576576
}
577577

578-
const { getExternalRuleOptions, lint } = nativeBinding
579-
export { getExternalRuleOptions }
578+
const { lint } = nativeBinding
580579
export { lint }

apps/oxlint/src-js/plugins/lint.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
finalizeCompiledVisitor,
1313
initCompiledVisitor,
1414
} from "./visitor.js";
15-
import { getExternalRuleOptions } from "../bindings.js";
1615

1716
// Lazy implementation
1817
/*
@@ -145,14 +144,6 @@ function lintFileImpl(
145144
"Rule IDs and options IDs arrays must be the same length",
146145
);
147146

148-
// Initialize external rule options if not already initialized
149-
if (!areOptionsInitialized()) {
150-
const optionsJson = getExternalRuleOptions();
151-
if (optionsJson !== null && optionsJson.length > 0) {
152-
setOptions(optionsJson);
153-
}
154-
}
155-
156147
for (let i = 0, len = ruleIds.length; i < len; i++) {
157148
const ruleId = ruleIds[i];
158149
debugAssert(ruleId < registeredRules.length, "Rule ID out of bounds");

0 commit comments

Comments
 (0)