Skip to content

feat(language_server): add typeAware option#13146

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-16-feat_langauge_server_add_typeaware_option
Aug 26, 2025
Merged

feat(language_server): add typeAware option#13146
graphite-app[bot] merged 1 commit intomainfrom
08-16-feat_langauge_server_add_typeaware_option

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Aug 16, 2025

@github-actions github-actions bot added A-linter Area - Linter A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Aug 16, 2025
@Sysix Sysix changed the title feat(langauge_server): add typeAware option feat(language_server): add typeAware option Aug 16, 2025
Copy link
Member Author

Sysix commented Aug 16, 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.

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from 632538a to fbd00de Compare August 16, 2025 16:54
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 16, 2025

CodSpeed Instrumentation Performance Report

Merging #13146 will not alter performance

Comparing 08-16-feat_langauge_server_add_typeaware_option (faee1a4) with main (5d898e8)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (faee1a4) during the generation of this report, so 5d898e8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch 2 times, most recently from 1488a7e to a46e64e Compare August 16, 2025 18:11
@Sysix Sysix force-pushed the 08-16-refactor_linter_add_impl_for_tsgolintdiagnostic_into_message_ branch from afc7d3c to 17885e4 Compare August 16, 2025 18:11
@Sysix Sysix changed the base branch from 08-16-refactor_linter_add_impl_for_tsgolintdiagnostic_into_message_ to graphite-base/13146 August 16, 2025 18:18
@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from a46e64e to c25f0e7 Compare August 16, 2025 19:18
@Sysix Sysix force-pushed the graphite-base/13146 branch from 17885e4 to 0f8e4b1 Compare August 16, 2025 19:18
@Sysix Sysix changed the base branch from graphite-base/13146 to 08-16-refactor_linter_add_impl_for_tsgolintdiagnostic_into_message_ August 16, 2025 19:18
@graphite-app graphite-app bot changed the base branch from 08-16-refactor_linter_add_impl_for_tsgolintdiagnostic_into_message_ to graphite-base/13146 August 16, 2025 20:17
@graphite-app graphite-app bot force-pushed the graphite-base/13146 branch from 0f8e4b1 to 700b412 Compare August 16, 2025 20:21
@graphite-app graphite-app bot force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from c25f0e7 to 646bda4 Compare August 16, 2025 20:21
@graphite-app graphite-app bot changed the base branch from graphite-base/13146 to main August 16, 2025 20:22
@graphite-app graphite-app bot force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from 646bda4 to 78e23e3 Compare August 16, 2025 20:22
@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from 78e23e3 to 7be0a93 Compare August 16, 2025 20:46
@Sysix Sysix marked this pull request as ready for review August 16, 2025 21:15
Copilot AI review requested due to automatic review settings August 16, 2025 21:15
@Sysix Sysix requested a review from camc314 as a code owner August 16, 2025 21:15
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

Adds TypeScript type-aware linting support to the language server by integrating TsGoLint capabilities alongside the existing Oxc linter. The typeAware option enables clients to use TypeScript's type system for more sophisticated linting rules.

  • Introduces new typeAware configuration option in language server options
  • Adds TsgoLinter wrapper to integrate TsGoLint with the language server
  • Implements streaming diagnostic processing for better performance with TsGoLint

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/oxc_linter/src/tsgolint.rs Adds lint_source method for processing single files with streaming diagnostics
crates/oxc_language_server/src/worker.rs Updates linting conditions to restrict type-aware linting to OnSave only
crates/oxc_language_server/src/options.rs Adds typeAware configuration option parsing and testing
crates/oxc_language_server/src/linter/tsgo_linter.rs New wrapper for TsGoLint integration with file filtering logic
crates/oxc_language_server/src/linter/server_linter.rs Integrates TsgoLinter with existing ServerLinter
crates/oxc_language_server/README.md Documents the new typeAware configuration option

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch 2 times, most recently from 3c82dcc to b296328 Compare August 16, 2025 21:41
@Boshen
Copy link
Member

Boshen commented Aug 17, 2025

We will probably end up adding typeAware: true config which makes this unnecessary?

@Sysix
Copy link
Member Author

Sysix commented Aug 17, 2025

We will probably end up adding typeAware: true config which makes this unnecessary?

You mean enabling typeAware by default? The option could be used for disabling it. Hope the CLI will have something similar too :)

EDIT: oh I think you mean .oxlintrc.json configuration. Sorry :D. Yes, that is then unnecessary.
But I guess the same for --type-aware flag?

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch 2 times, most recently from baa1e45 to 718b34e Compare August 17, 2025 12:18
@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from 718b34e to 5be8bec Compare August 19, 2025 22:42
@camc314
Copy link
Contributor

camc314 commented Aug 20, 2025

@Boshen shall we merge this, and then remove it at a later date once typeAware: true option exists in the config file?

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch 2 times, most recently from db657c5 to b911aff Compare August 20, 2025 19:22
@camc314
Copy link
Contributor

camc314 commented Aug 21, 2025

@Boshen shall we merge this, and then remove it at a later date once typeAware: true option exists in the config file?

@Sysix based on this message, i think we should hold off on this until the perf/memory issues in tsgolint are addressed.

@Sysix
Copy link
Member Author

Sysix commented Aug 21, 2025

@Sysix based on this message, i think we should hold off on this until the perf/memory issues in tsgolint are addressed.

I could not identify a problem with the language server. The import plugin memory problem is still valid. But typeAware should be no problem. The Process is started and closed with each diagnostic request. It is not perfect, but I do not see memory issues with it 🤔
We are always executing tsgolint with only one file.

@Sysix Sysix force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch 2 times, most recently from 2c3bc1b to 8629aec Compare August 22, 2025 11:08
@Sysix
Copy link
Member Author

Sysix commented Aug 24, 2025

@Boshen the request for this feature is high. See the linked issues in #13147

@Boshen shall we merge this, and then remove it at a later date once typeAware: true option exists in the config file

I could not identify a problem with the language server. The import plugin memory problem is still valid. But typeAware should be no problem. The Process is started and closed with each diagnostic request. It is not perfect, but I do not see memory issues with it 🤔
We are always executing tsgolint with only one file.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 26, 2025
Copy link
Member

Boshen commented Aug 26, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 08-16-feat_langauge_server_add_typeaware_option branch from 8629aec to faee1a4 Compare August 26, 2025 02:39
@graphite-app graphite-app bot merged commit faee1a4 into main Aug 26, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 08-16-feat_langauge_server_add_typeaware_option branch August 26, 2025 02:43
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants