-
-
Notifications
You must be signed in to change notification settings - Fork 52
fix: use synckit to support Prettier 3 #199
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
84503d6
fix: use worker_threads to support Prettier 3
dc7e9e4
Update README.md
idahogurl 9236587
refactor: simplify 'startWorker' function
4b73779
fix: use synckit to optimize performance
128ca4c
chore(dev-deps): downgrade eslint to 8.52.0
a936496
chore(dev-deps): lock eslint to 8.52.0
a6907e4
chore(ci): add worker build command
d50c5a2
fix: preload worker before first run
24813eb
chore: bump version
991921c
Update CHANGELOG.md
idahogurl 19336e5
Apply suggestions from code review
idahogurl a7ccd05
fix: update yarn.lock
a23bf8f
chore(dev-deps): remove unused packages
f2d9d4f
fix: use synckit with ESM correctly (#201)
JounQin 83b051c
Update CHANGELOG.md
idahogurl a76c8b5
Update package.json
idahogurl 8981b99
Docs: Add @JounQin as a contributor
9c81fc2
Update test.yml
idahogurl c849761
docs: :memo: add jsdoc to ignore functions
aeaab5f
chore: add source maps to output
5c3f430
Warp up prettier-eslint worker with first available open document (#202)
netux 118d130
fix: resolve ESLint errors
cc0c41e
fix: resolve absolute path to file url correctly (#206)
novarolV 83d3129
Update package.json
idahogurl 8f99daf
chore: bump synckit to lighter v0.9.0 (#207)
JounQin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
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
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { runAsWorker } from 'synckit'; | ||
|
|
||
| runAsWorker(async ({ | ||
| text, prettierEslintPath, filePath, extensionConfig, | ||
| }) => { | ||
| // eslint-disable-next-line import/no-dynamic-require, global-require | ||
| const format = require(prettierEslintPath); | ||
idahogurl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
idahogurl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return format({ | ||
| text, | ||
| filePath, | ||
| logLevel: 'info', | ||
| prettierLast: extensionConfig?.prettierLast || false, | ||
idahogurl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }); | ||
| }); | ||
Binary file not shown.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.