Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 17, 2025

counterpart of oxc-project/tsgolint#291

the downstream PR successfully lints the in memory file:
tsgolint-in-memory

It is just a refactoring because the TsgoLinter will still only be used onSave

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Oct 17, 2025
Copy link
Member Author

Sysix commented Oct 17, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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-hq
Copy link

codspeed-hq bot commented Oct 17, 2025

CodSpeed Performance Report

Merging #14733 will not alter performance

Comparing 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ (ecd3fb5) with main (ace4def)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from aa9e30f to b1c0f28 Compare October 21, 2025 20:46
@camc314 camc314 self-assigned this Oct 22, 2025
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from b1c0f28 to 9b2fdf0 Compare October 29, 2025 18:05
@Sysix Sysix marked this pull request as ready for review October 29, 2025 18:56
@Sysix Sysix requested a review from camc314 as a code owner October 29, 2025 18:56
Copilot AI review requested due to automatic review settings October 29, 2025 18:56
Copy link
Contributor

Copilot AI left a 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_overrides parameter to the json_input method and Payload struct
  • Updated lint_source method to populate source overrides with the provided source text
  • Updated lint method to pass None for 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 Payload struct is incomplete. It should include the newly added source_overrides field 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.

@Sysix Sysix changed the title feat(language_server): send in memory source text to tsgolint refactor(language_server): send in memory source text to tsgolint Oct 29, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Oct 29, 2025
@Sysix Sysix removed the C-enhancement Category - New feature or request label Oct 29, 2025
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from 9b2fdf0 to 0e01d98 Compare October 30, 2025 20:29
@Sysix Sysix force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from 0e01d98 to ecd3fb5 Compare October 30, 2025 21:41
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 3, 2025
Copy link
Contributor

camc314 commented Nov 3, 2025

Merge activity

…14733)

counterpart of oxc-project/tsgolint#291

the downstream  PR successfully lints the in memory file:
![tsgolint-in-memory](https://github.com/user-attachments/assets/5409c5e5-bda5-44f9-bea7-6ce0a64f2502)

It is just a refactoring because the `TsgoLinter` will still only be used `onSave`
@graphite-app graphite-app bot force-pushed the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch from ecd3fb5 to 5501ed2 Compare November 3, 2025 09:02
@graphite-app graphite-app bot merged commit 5501ed2 into main Nov 3, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ branch November 3, 2025 09:06
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 3, 2025
@Boshen Boshen mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants