diff --git a/packages/eslint-plugin-pf-codemods/src/ruleCustomization.ts b/packages/eslint-plugin-pf-codemods/src/ruleCustomization.ts index 029ec551..fd2adb64 100644 --- a/packages/eslint-plugin-pf-codemods/src/ruleCustomization.ts +++ b/packages/eslint-plugin-pf-codemods/src/ruleCustomization.ts @@ -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", diff --git a/packages/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts b/packages/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts index f5a9b748..5694c643 100644 --- a/packages/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts +++ b/packages/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts @@ -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);