Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 25, 2024
1 parent 9d1caab commit 531c132
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ impl RestrictedPath {
}
x => x,
}
},
}
ImportImportName::Default(span) => {
let name = CompactStr::new("default");
match is_name_span_allowed_in_path(&name, self) {
Expand Down Expand Up @@ -640,12 +640,14 @@ impl NoRestrictedImports {
NameSpanAllowedResult::GeneralDisallowed => {
ctx.diagnostic(diagnostic_path(span, path.message.clone(), source))
}
NameSpanAllowedResult::NameDisallowed(name_span) => ctx.diagnostic(diagnostic_import_name(
name_span.clone().unwrap().span(),
path.message.clone(),
name_span.unwrap().name(),
source,
)),
NameSpanAllowedResult::NameDisallowed(name_span) => {
ctx.diagnostic(diagnostic_import_name(
name_span.clone().unwrap().span(),
path.message.clone(),
name_span.unwrap().name(),
source,
))
}
NameSpanAllowedResult::Allowed => (),
}
}
Expand Down Expand Up @@ -701,12 +703,14 @@ impl NoRestrictedImports {
let span = entry.span;
ctx.diagnostic(diagnostic_path(span, path.message.clone(), source))
}
NameSpanAllowedResult::NameDisallowed(name_span) => ctx.diagnostic(diagnostic_import_name(
name_span.clone().unwrap().span(),
path.message.clone(),
name_span.unwrap().name(),
source,
)),
NameSpanAllowedResult::NameDisallowed(name_span) => {
ctx.diagnostic(diagnostic_import_name(
name_span.clone().unwrap().span(),
path.message.clone(),
name_span.unwrap().name(),
source,
))
}
NameSpanAllowedResult::Allowed => (),
}
}
Expand Down

0 comments on commit 531c132

Please sign in to comment.