fix(LoginPage): updated markup for LoginMainHeader#752
Merged
adamviktora merged 5 commits intopatternfly:mainfrom Sep 2, 2024
Merged
fix(LoginPage): updated markup for LoginMainHeader#752adamviktora merged 5 commits intopatternfly:mainfrom
adamviktora merged 5 commits intopatternfly:mainfrom
Conversation
| imports: ImportSpecifier | ImportSpecifier[], | ||
| exactMatch: boolean = false | ||
| ) { | ||
| if (!pfPackageMatches("@patternfly/react-core", node.source.value)) { |
Collaborator
There was a problem hiding this comment.
Shouldn't the package here be customizable so that table or extensions or what have you are supported?
adamviktora
reviewed
Aug 28, 2024
Contributor
adamviktora
left a comment
There was a problem hiding this comment.
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( |
Contributor
There was a problem hiding this comment.
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
adamviktora
approved these changes
Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #751