Skip to content

LG-11654: Enable React (and React Hook) Lint Rules for One File#9706

Merged
charleyf merged 20 commits intomainfrom
charley/lg-11654-enable-lint-rule-for-hooks
Dec 15, 2023
Merged

LG-11654: Enable React (and React Hook) Lint Rules for One File#9706
charleyf merged 20 commits intomainfrom
charley/lg-11654-enable-lint-rule-for-hooks

Conversation

@charleyf
Copy link
Contributor

@charleyf charleyf commented Dec 5, 2023

🎫 Ticket

https://cm-jira.usa.gov/browse/LG-11654

🛠 Summary of changes

This PR is an experimental way to turn on react linting very selectively. It's meant as a way for me to get comments on approach, and also hopefully allow us to move towards using reacts recommended lint rules to avoid bugs.

📜 Testing Plan

Test that the document upload flow continues to work. Make sure the troubleshooting options appear correctly. To see them, you'll need to upload the failing document yaml file.

@charleyf charleyf changed the title Charley/lg 11654 enable lint rule for hooks LG-11654: Enable React (and React Hook) Lint Rules for One File Dec 7, 2023
@charleyf
Copy link
Contributor Author

Calling this out since it's a shift from my original intentions with this PR.

Enabling hook linting for document-capture.tsx caused some interesting test (and real) failures that will take some effort to fix. Since this PR is mostly about turning on the new linting approach I took the easy way out and deferred linting on that file, instead I made much simpler lint fixes to document-capture-troubleshooting-options.spec.tsx.

@charleyf charleyf marked this pull request as ready for review December 14, 2023 14:50
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple questions, but LGTM otherwise 👍

@charleyf charleyf merged commit e134829 into main Dec 15, 2023
@charleyf charleyf deleted the charley/lg-11654-enable-lint-rule-for-hooks branch December 15, 2023 14:33
@jmdembe jmdembe mentioned this pull request Dec 19, 2023
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.

3 participants