Set eslint's max-warnings to 0 to match pre-commit hooks #7617
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.
Description
We had some code that had
eslint
warnings slip into master (see Slack thread for more context). Those warnings started to show up on subsequent PRs. Digging into how this could get through our checks, I noticed our pre-commit hooks set--max-warnings=0
oneslint
which fails the hook if there are warnings (the warnings got in by accident after disabling pre-commit hooks to get code pushed up). In contrast, theeslint
command we use in the build process did not havemax-warnings
set. This adds it.Reviewer Notes
This PR should have some failures until we get the warnings fixed. I wanted to get a PR up and make sure that it failed on warnings, then we can merge the warning fixes in when they land and try it again and see that everything is hopefully clear. I don't want to merge this until we're clear as it may block the warning fixes from being applied.
I'll make this a draft PR and label it withUpdate: PR is now out of draft and warnings should be gone.do not merge
until everything's ready.Let me know if you can think of anything that this would negatively impact.
Setup
Locally, you can run
yarn run lint
and see that the warnings return an exit code of 1 now. You should hopefully see a failure in the checks on this PR too.