@@ -109,13 +109,10 @@ impl ServerLinter {
109
109
110
110
let base_patterns = oxlintrc. ignore_patterns . clone ( ) ;
111
111
112
- let config_builder = ConfigStoreBuilder :: from_oxlintrc (
113
- false ,
114
- oxlintrc,
115
- None ,
116
- & mut ExternalPluginStore :: default ( ) ,
117
- )
118
- . unwrap_or_default ( ) ;
112
+ let mut external_plugin_store = ExternalPluginStore :: default ( ) ;
113
+ let config_builder =
114
+ ConfigStoreBuilder :: from_oxlintrc ( false , oxlintrc, None , & mut external_plugin_store)
115
+ . unwrap_or_default ( ) ;
119
116
120
117
// TODO(refactor): pull this into a shared function, because in oxlint we have the same functionality.
121
118
let use_nested_config = options. use_nested_configs ( ) ;
@@ -125,7 +122,6 @@ impl ServerLinter {
125
122
&& nested_configs. pin ( ) . values ( ) . any ( |config| config. plugins ( ) . has_import ( ) ) ) ;
126
123
127
124
extended_paths. extend ( config_builder. extended_paths . clone ( ) ) ;
128
- let external_plugin_store = ExternalPluginStore :: default ( ) ;
129
125
let base_config = config_builder. build ( & external_plugin_store) . unwrap_or_else ( |err| {
130
126
warn ! ( "Failed to build config: {err}" ) ;
131
127
ConfigStoreBuilder :: empty ( ) . build ( & external_plugin_store) . unwrap ( )
@@ -152,7 +148,7 @@ impl ServerLinter {
152
148
} else {
153
149
FxHashMap :: default ( )
154
150
} ,
155
- ExternalPluginStore :: default ( ) ,
151
+ external_plugin_store ,
156
152
) ;
157
153
158
154
let isolated_linter = IsolatedLintHandler :: new (
@@ -216,17 +212,17 @@ impl ServerLinter {
216
212
} ;
217
213
// Collect ignore patterns and their root
218
214
nested_ignore_patterns. push ( ( oxlintrc. ignore_patterns . clone ( ) , dir_path. to_path_buf ( ) ) ) ;
215
+ let mut external_plugin_store = ExternalPluginStore :: default ( ) ;
219
216
let Ok ( config_store_builder) = ConfigStoreBuilder :: from_oxlintrc (
220
217
false ,
221
218
oxlintrc,
222
219
None ,
223
- & mut ExternalPluginStore :: default ( ) ,
220
+ & mut external_plugin_store ,
224
221
) else {
225
222
warn ! ( "Skipping config (builder failed): {}" , file_path. display( ) ) ;
226
223
continue ;
227
224
} ;
228
225
extended_paths. extend ( config_store_builder. extended_paths . clone ( ) ) ;
229
- let external_plugin_store = ExternalPluginStore :: default ( ) ;
230
226
let config = config_store_builder. build ( & external_plugin_store) . unwrap_or_else ( |err| {
231
227
warn ! ( "Failed to build nested config for {}: {:?}" , dir_path. display( ) , err) ;
232
228
ConfigStoreBuilder :: empty ( ) . build ( & external_plugin_store) . unwrap ( )
0 commit comments