-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(LoginPage): updated markup for LoginMainHeader #752
fix(LoginPage): updated markup for LoginMainHeader #752
Conversation
imports: ImportSpecifier | ImportSpecifier[], | ||
exactMatch: boolean = false | ||
) { | ||
if (!pfPackageMatches("@patternfly/react-core", node.source.value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the package here be customizable so that table or extensions or what have you are supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM regarding the rule, only a possible refactoring of the checkMatchingImportDeclaration
/ findSpecifier
helper
...es/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts
Outdated
Show resolved
Hide resolved
...es/eslint-plugin-pf-codemods/src/rules/helpers/nodeMatches/checkMatchingImportDeclaration.ts
Outdated
Show resolved
Hide resolved
} | ||
|
||
/** Used to check whether the current ImportDeclaration node matches at least 1 of the import specifiers. */ | ||
export function checkMatchingImportDeclaration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you refactor this helper to return only boolean? Or if there is a purpose of returning the specifier to return it as ImportSpecifier
with the type casting. Depends on whether we need the specifier in a return value, but in the array case it would just return the first specifier, so maybe using .some
everywhere (instead of .find
) would be better.
d9a831c
to
5f60623
Compare
Closes #751