-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore: reconfigure ESLint build, improve lint speed #4078
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
revert a very dumb autofix by blueprint html-components rulePreviews: documentation | landing | table |
add format-check CI taskPreviews: documentation | landing | table |
fix ts-jest configuration in eslint-pluginPreviews: documentation | landing | table |
split eslint-config into multiple configs so it can run in eslint-pluginPreviews: documentation | landing | table |
Merge remote-tracking branch 'origin/develop' into ad/fix-eslint-vscodePreviews: documentation | landing | table |
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.
@blueprintjs/eslint-plugin-blueprint
to@blueprintjs/eslint-plugin
for brevity. The last part of the name was redundant, and ESLint will resolve the package correctly without it. This required changing some inline enable/disable code flags.createDefaultProgram
) added in Fix failure to run eslint on win platform #4060 which was greatly slowing down ESLint. We don't need to create a default program for each file encountered; we can be explicit about what is in the TS program.tslint-plugin-prettier
from@blueprintjs/tslint-config
eslint-plugin-prettier
in@blueprintjs/eslint-config
eslint-plugin-prettier
in CI, but continue to run it in the default case so that vscode-eslint can report & fix errors for eslint and prettier in a single pass (we do this because vscode doesn't run multiple formatters for a filetype, and it is cumbersome to explicitly have to run both formatters while coding).During this process I did some very rough profiling of different lint configurations on my Macbook. This is for linting the whole monorepo with
lerna run lint:es --parallel
:From these performance characteristics I decided that:
yarn format
command to run prettier. in cases where convenience outweighs the performance cost (vscode-eslint), we should continue to run eslint-plugin-prettier.There are a bunch of whitespace formatting changes in this PR (you can view the diff without them here). Some of them are in
.md
files which were never formatted before, others are in test/ folders where tslint hadn't been running properly before. Outside of those files I'm not 100% sure why there are code diffs on line break formatting. I've kept the prettier version the same in this PR; the next one will include the bump to v2.0.