-
Notifications
You must be signed in to change notification settings - Fork 34
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
Run ESLint and Prettier linting in worker threads #548
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
This took an eternity because I went down a rabbit hole of parallelising Prettier and had little to show for it based on very rudimentary benchmarking of skuba itself; it seemed the overhead of spinning up multiple worker processes was significant. I may give this another shot with worker threads in future. While this is undeniably more code that using the ESLint and Prettier CLIs out of the box, it presents a few opportunities: - Customising logging output, particularly for `--debug`ging. - Taking the above point further: supporting Buildkite annotations, particularly when `lint`ing. - A marginally faster execution and smaller resource footprint. - Likelier compatibility with alternative module resolution approaches like Yarn PnP, which can make it harder to reliably locate other `.bin` tools when `exec`ing.
While this doesn't perform global linkage like `npm link`, its setup is almost instantaneous compared to an arduous install process with the npm command.
`fs-extra` is back, but only in `devDependencies`.
🦋 Changeset detectedLatest commit: 79a6b6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
We'd rather get feedback on a snapshot diff first.
72636c
force-pushed
the
lint-in-process
branch
from
September 23, 2021 13:04
ab76cfe
to
72b8bc0
Compare
This comment has been minimized.
This comment has been minimized.
72636c
commented
Sep 23, 2021
This doesn't seem to be necessary anymore.
etaoins
approved these changes
Sep 24, 2021
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.
🏆
Co-authored-by: Ryan Cumming <[email protected]>
Merged
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.
This gets us from
to
Worker threads are stable in all Node.js versions we support: https://nodejs.org/docs/latest-v12.x/api/worker_threads.html#worker_threads_worker_threads
TODO: