Skip to content

Commit 48919f3

Browse files
committed
delete set_external_options_json()
1 parent b4ea0e7 commit 48919f3

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

apps/oxlint/src/lint.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,6 @@ impl CliRunner {
329329
return CliRunResult::None;
330330
}
331331

332-
// After building config, serialize external rule options for JS side.
333-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
334-
{
335-
let store = config_store.external_plugin_store();
336-
crate::set_external_options_json(store);
337-
}
338-
339332
let files_to_lint = paths
340333
.into_iter()
341334
.filter(|path| !ignore_matcher.should_ignore(Path::new(path)))

apps/oxlint/src/run.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,6 @@ use crate::{
1616
result::CliRunResult,
1717
};
1818

19-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
20-
use oxc_linter::ExternalPluginStore;
21-
22-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
23-
use std::sync::OnceLock;
24-
25-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
26-
static EXTERNAL_OPTIONS_JSON: OnceLock<String> = OnceLock::new();
27-
28-
/// Set serialized external rule options JSON after building configs.
29-
/// Called from Rust side (internal) before any linting, then consumed on first call to `lint`.
30-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
31-
pub fn set_external_options_json(plugin_store: &ExternalPluginStore) {
32-
let _ = EXTERNAL_OPTIONS_JSON.set(plugin_store.serialize_all_options());
33-
}
34-
35-
/// JS callable function to retrieve the serialized external rule options.
36-
/// Returns a JSON string of options arrays. Called once from JS after creating the external linter.
37-
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
38-
#[napi]
39-
pub fn get_external_rule_options() -> Option<String> {
40-
EXTERNAL_OPTIONS_JSON.get().cloned()
41-
}
42-
4319
/// JS callback to load a JS plugin.
4420
#[napi]
4521
pub type JsLoadPluginCb = ThreadsafeFunction<

0 commit comments

Comments
 (0)