Skip to content
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

Add rule to warn not to migrate certain models #1027

Merged
merged 6 commits into from
Apr 19, 2024
Merged

Conversation

ataker
Copy link
Contributor

@ataker ataker commented Apr 10, 2024

Description

Add a warning not to migrate React Modals that need to remain for the injected header. This will only show in certain directories based on .eslintrc files in vets-website.

Partial Injected Header - Add eslint warning & inline comments for React Modals that should not be touched#2541

Testing done

Added test. Tested eslint in vet-website locally.

Screenshots

Screenshot 2024-04-10 at 14 42 34

Acceptance criteria

  • Add warning not to upgrade Modals

Definition of done

  • Changes have been tested in vets-website
  • Changes have been tested in IE11, if applicable
  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

@ataker ataker requested a review from a team as a code owner April 10, 2024 19:29
@ataker
Copy link
Contributor Author

ataker commented Apr 10, 2024

Wanted to point out in the screenshot it does show both "upgrade this component" and "DO NOT upgrade this component" messages. I could make it so it only shows the correct one, but it would require pulling the modalTransformer out of the prefer-web-component rules so it could individually be toggled on/off in certain directories. It wouldn't be too much work, just wanted feedback before starting on it.

@jamigibbs
Copy link
Contributor

I could make it so it only shows the correct one, but it would require pulling the modalTransformer out of the prefer-web-component rules so it could individually be toggled on/off in certain directories. It wouldn't be too much work, just wanted feedback before starting on it.

Are there any other usages of the Modal React component outside of the injected header at this point?

@jamigibbs
Copy link
Contributor

This will only show in certain directories based on .eslintrc files in vets-website.

How does this work? Is there a corresponding vets-website PR?

@ataker ataker requested a review from a team as a code owner April 17, 2024 17:00
@ataker
Copy link
Contributor Author

ataker commented Apr 17, 2024

There's only one instance of a React Modal outside of these directories and it's in the github-actions directory. I think I'm fine making this message eslint rule universal and removing the "please upgrade this message".
Screenshot 2024-04-16 at 20 05 57

@ataker ataker merged commit 4f5117e into master Apr 19, 2024
5 of 6 checks passed
@ataker ataker deleted the do-not-upgrade-modals branch April 19, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants