feat(oxlint/lsp): support jsPlugins#15839
Conversation
jsPluginsjsPlugins
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #15839 will not alter performanceComparing Summary
Footnotes
|
4813d86 to
b92081d
Compare
jsPluginsjsPlugins
85415a9 to
374555a
Compare
apps/oxlint/src-js/plugins/load.ts
Outdated
| // This allows re-loading the plugin when the linter is restarted in `--lsp` mode. | ||
| if (registeredPluginPaths.has(path)) { | ||
| throw new Error('This plugin has already been registered. This is a bug in Oxlint. Please report it.'); | ||
| registeredPluginPaths.delete(path); |
There was a problem hiding this comment.
@overlookmotel I am not sure if this is the right approach.
When changing a .oxlintrc.json file, the server will restart the tool (linter) and re-register all plugins.
I would prefer that each instance get started with an empty registeredPluginPaths, and not share between restarts/workspaces.
But it looks complicated to achieve :(
The main difference from oxlint with jsPlugins and oxlint --lsp is:
oxlintwill only run once with a knowncwdfrom the beginningoxlint --lspwill start multiple instances for each workspace (see https://code.visualstudio.com/docs/editing/workspaces/multi-root-workspaces for multi root workspaces)oxlint --lspwill restart the linter (service) when a.oxlintrc.jsonfile or a relevant LSP configuration is changed
bf8727d to
8aa94a6
Compare
8aa94a6 to
4b6bcbf
Compare
4b6bcbf to
71bd634
Compare
5562192 to
5353e40
Compare
ba45c78 to
d595d93
Compare
1f793f4 to
fda5042
Compare
9223972 to
150ace0
Compare
ce53742 to
8a4ded6
Compare
150ace0 to
62ed619
Compare
62ed619 to
1bf76a9
Compare
8a4ded6 to
6442112
Compare
|
too old, opened a new PR: #17840 |

related #14826