Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
thatblindgeye committed Aug 27, 2024
1 parent e3da442 commit d9a831c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const warningRules = [
"horizontalSubnav-warn-ariaLabel",
"jumpLinksItem-warn-markup-change",
"label-warn-truncated-default",
"loginMainHeader-warn-updated-markup",
"logViewer-moved-styles",
"menuItemAction-warn-update-markup",
"menuToggle-warn-iconOnly-toggle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ function findSpecifier(
export function checkMatchingImportDeclaration(
node: ImportDeclaration,
imports: ImportSpecifier | ImportSpecifier[],
exactMatch: boolean = false
packageNamne: string = "@patternfly/react-core"
) {
if (!pfPackageMatches("@patternfly/react-core", node.source.value)) {
if (!pfPackageMatches(packageNamne, node.source.value)) {
return false;
}

if (Array.isArray(imports)) {
return exactMatch
? imports.every((imp) => findSpecifier(node, imp))
: imports.some((imp) => findSpecifier(node, imp));
return imports.some((imp) => findSpecifier(node, imp));
}

return findSpecifier(node, imports);
Expand Down

0 comments on commit d9a831c

Please sign in to comment.