@@ -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]
4521pub type JsLoadPluginCb = ThreadsafeFunction <
0 commit comments