-
Notifications
You must be signed in to change notification settings - Fork 677
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
Switch to eslint + prettier #5870
Merged
Merged
Conversation
This file contains 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
JoeRobich
reviewed
Jun 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this work.
arunchndr
approved these changes
Jun 27, 2023
@davidwengier / @allisonchou mind taking a look from the Razor side? Would like to get this in since it affects almost every file in the repo. |
davidwengier
approved these changes
Jun 28, 2023
WardenGnaw
approved these changes
Jun 28, 2023
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.
TSLint is deprecated and we're lacking a consistent style throughout the repo
This PR adds eslint + typescript eslint + prettier with the generally recommended settings or with settings that were previously configured by TSLint.
Also importantly changes the case of files to be camelCase. Interfaces are currently ignored - those need to be renamed to not be
IInterface
. The typical ts way is to just name them as standard types with regular names.There are likely more rules we can turn on, but I would do those in a followup PR.
I think commit at a time is the best way to look at this.
ab9ed4a look at the .eslintrc.js file for the config and skim the changes to see if anything looks out of place
57f79a1 finishes addressing the errors introduced by the initial config in the commit above.
f7296da adds file name rules to eslint. The rest is basically just file renames and can probably be skimmed.
033b0aa removes TSLint and adds the remaining tslint rules to the eslint config + adds prettier config rules.
01ab588 is the result of running the automatic prettier fixer. Look at the previous commit for the rules.
0798590 fixes a couple more outstanding issues
And then the rest are more small fixes that got left out / mixed in the first set of changes.
NOTE
This introduces a new warning when running the build, specifically
This is a known issue and most likely not a problem for us, see typescript-eslint/typescript-eslint#6934
We should update when there is a version with the fix.