Skip to content

Commit

Permalink
feat(noUndeclaredDependencies): Use the new matches_with_exceptions API
Browse files Browse the repository at this point in the history
Signed-off-by: Naoki Ikeguchi <me@s6n.jp>
  • Loading branch information
siketyan committed Oct 25, 2024
1 parent 43bb91a commit 5601759
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use biome_deserialize_macros::Deserializable;
use biome_js_syntax::{AnyJsImportClause, AnyJsImportLike};
use biome_rowan::AstNode;

use crate::utils::restricted_glob::RestrictedGlob;
use crate::utils::restricted_glob::{CandidatePath, RestrictedGlob};
use crate::{globals::is_node_builtin_module, services::manifest::Manifest};

declare_lint_rule! {
Expand Down Expand Up @@ -182,7 +182,7 @@ impl DependencyAvailability {
match self {
Self::Available => true,
Self::Unavailable => false,
Self::FilesGlob(globs) => globs.iter().any(|glob| glob.is_match(path)),
Self::FilesGlob(globs) => CandidatePath::new(&path).matches_with_exceptions(globs),
}
}
}
Expand Down

0 comments on commit 5601759

Please sign in to comment.