Skip to content

Commit 46b59d8

Browse files
committed
refactor(linter): remove unused ContextHost::with_config (#11970)
1 parent 0cef370 commit 46b59d8

File tree

1 file changed

+2
-16
lines changed
  • crates/oxc_linter/src/context

1 file changed

+2
-16
lines changed

crates/oxc_linter/src/context/host.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,6 @@ impl<'a> ContextHost<'a> {
106106
.sniff_for_frameworks()
107107
}
108108

109-
/// Set the linter configuration for this context.
110-
#[inline]
111-
pub fn with_config(mut self, config: &Arc<LintConfig>) -> Self {
112-
let plugins = config.plugins;
113-
self.config = Arc::clone(config);
114-
115-
if self.plugins != plugins {
116-
self.plugins = plugins;
117-
return self.sniff_for_frameworks();
118-
}
119-
120-
self
121-
}
122-
123109
/// Shared reference to the [`Semantic`] analysis of the file.
124110
#[inline]
125111
pub fn semantic(&self) -> &Semantic<'a> {
@@ -149,8 +135,8 @@ impl<'a> ContextHost<'a> {
149135
}
150136

151137
#[inline]
152-
pub fn plugins(&self) -> LintPlugins {
153-
self.plugins
138+
pub fn plugins(&self) -> &LintPlugins {
139+
&self.plugins
154140
}
155141

156142
/// Add a diagnostic message to the end of the list of diagnostics. Can be used

0 commit comments

Comments
 (0)