Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions crates/oxc_linter/src/context/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct ContextSubHost<'a> {
pub(super) module_record: Arc<ModuleRecord>,
/// Information about specific rules that should be disabled or enabled, via comment directives like
/// `eslint-disable` or `eslint-disable-next-line`.
pub(super) disable_directives: Rc<DisableDirectives<'a>>,
pub(super) disable_directives: DisableDirectives<'a>,
// Specific framework options, for example, whether the context is inside `<script setup>` in Vue files.
pub(super) framework_options: FrameworkOptions,
/// The source text offset of the sub host
Expand Down Expand Up @@ -75,7 +75,7 @@ impl<'a> ContextSubHost<'a> {
semantic,
module_record,
source_text_offset,
disable_directives: Rc::new(disable_directives),
disable_directives,
framework_options: frameworks_options,
}
}
Expand All @@ -93,7 +93,7 @@ impl<'a> ContextSubHost<'a> {
}

/// Shared reference to the [`DisableDirectives`]
pub fn disable_directives(&self) -> &Rc<DisableDirectives<'a>> {
pub fn disable_directives(&self) -> &DisableDirectives<'a> {
&self.disable_directives
}
}
Expand Down Expand Up @@ -202,7 +202,7 @@ impl<'a> ContextHost<'a> {
}

/// Shared reference to the [`DisableDirectives`] of the current script block.
pub fn disable_directives(&self) -> &Rc<DisableDirectives<'a>> {
pub fn disable_directives(&self) -> &DisableDirectives<'a> {
&self.current_sub_host().disable_directives
}

Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl<'a> LintContext<'a> {

/// List of all disable directives in the file being linted.
#[inline]
pub fn disable_directives(&self) -> &Rc<DisableDirectives<'a>> {
pub fn disable_directives(&self) -> &DisableDirectives<'a> {
self.parent.disable_directives()
}

Expand Down
Loading