-
-
Notifications
You must be signed in to change notification settings - Fork 711
refactor(language_server): send in memory source text to tsgolint
#14733
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
refactor(language_server): send in memory source text to tsgolint
#14733
Conversation
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 #14733 will not alter performanceComparing Summary
Footnotes
|
aa9e30f to
b1c0f28
Compare
b1c0f28 to
9b2fdf0
Compare
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.
Pull Request Overview
This PR adds support for passing source text overrides to the tsgolint linter, enabling linting of in-memory content without requiring files to be written to disk. This is particularly useful for language server scenarios where the editor may have unsaved changes.
- Added optional
source_overridesparameter to thejson_inputmethod andPayloadstruct - Updated
lint_sourcemethod to populate source overrides with the provided source text - Updated
lintmethod to passNonefor source overrides to maintain existing behavior
Comments suppressed due to low confidence (1)
crates/oxc_linter/src/tsgolint.rs:481
- The JSON documentation example for the
Payloadstruct is incomplete. It should include the newly addedsource_overridesfield to accurately reflect the structure. Consider updating the example to include:\"source_overrides\": { \"/path/to/file.ts\": \"file content\" }
/// Represents the input JSON to `tsgolint`, like:
///
/// ```json
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tsgolinttsgolint
9b2fdf0 to
0e01d98
Compare
0e01d98 to
ecd3fb5
Compare
Merge activity
|
…14733) counterpart of oxc-project/tsgolint#291 the downstream PR successfully lints the in memory file:  It is just a refactoring because the `TsgoLinter` will still only be used `onSave`
ecd3fb5 to
5501ed2
Compare

counterpart of oxc-project/tsgolint#291
the downstream PR successfully lints the in memory file:

It is just a refactoring because the
TsgoLinterwill still only be usedonSave