PN-268 Standardize ESLint and Prettier#83
Merged
tankakatan merged 3 commits intodevelopfrom Oct 21, 2022
Merged
Conversation
tankakatan
approved these changes
Oct 21, 2022
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.
These changes adjust ESLint and Prettier configuration to be consistent with the settings in Point Engine.
After changing the rules, I ran both tools to autofix as much as possible (there were over 500 problems).
After that, I manually fixed some very small problems. I didn't want to touch anything that could affect functionality so I restricted myself to only making minor styling changes.
Ultimately, the goal was to have 0 errors so that we could add a github action to lint PRs. With this goal in mind, I made the following changes:
I downgraded some error rules to be warnings and left a TODO next to them. These rules were causing hundreds of errors that could not be autofixed.
In a few cases, I added some eslint-disable directives inside some files. In these cases, I think we need to be more careful about the fix, so I didn't want to make them here, where they would be lost in a sea of changes.
npm run lintbefore:npm run lintafter: