Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions crates/oxc_language_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,25 +552,23 @@ impl Backend {
Oxlintrc::default()
};

let config_store = ConfigStoreBuilder::from_oxlintrc(true, oxlintrc.clone())
let config_store = ConfigStoreBuilder::from_oxlintrc(false, oxlintrc.clone())
.expect("failed to build config")
.build()
.expect("failed to build config");

let lint_options = LintOptions { fix: FixKind::SafeFix, ..Default::default() };

let linter = if self.options.lock().await.disable_nested_configs() {
Linter::new(LintOptions::default(), config_store).with_fix(FixKind::SafeFix)
Linter::new(lint_options, config_store)
} else {
let nested_configs = self.nested_configs.pin();
let nested_configs_copy: FxHashMap<PathBuf, ConfigStore> = nested_configs
.iter()
.map(|(key, value)| (key.clone(), value.clone()))
.collect::<FxHashMap<_, _>>();

Linter::new_with_nested_configs(
LintOptions::default(),
config_store,
nested_configs_copy,
)
Linter::new_with_nested_configs(lint_options, config_store, nested_configs_copy)
};

*self.server_linter.write().await = ServerLinter::new_with_linter(linter);
Expand Down