fix(js): recognize tsgo in dependency-checks lint rule#35048
Merged
Conversation
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit f587a5c
☁️ Nx Cloud last updated this comment at |
The @nx/dependency-checks rule detects tslib usage by checking if the build command contains `tsc`. When using tsgo as the compiler, the command is `tsgo --build` which didn't match. This caused a false positive "tslib is not used" lint error.
5e8ab73 to
f587a5c
Compare
jaysoo
approved these changes
Mar 27, 2026
AgentEnder
approved these changes
Mar 27, 2026
FrozenPandaz
added a commit
that referenced
this pull request
Mar 31, 2026
## Current Behavior The `@nx/dependency-checks` lint rule detects `tslib` as a required dependency by checking if the build command contains `tsc` (via `/\btsc\b/` regex). When a project uses `tsgo` as its compiler, the build command is `tsgo --build` which doesn't match — causing a false positive "tslib is not used" lint error. ## Expected Behavior The regex also matches `tsgo`, so projects using either `tsc` or `tsgo` correctly detect `tslib` as needed when `importHelpers: true` is set. ## Related Issue(s) N/A — discovered while enabling tsgo for the nx package (cherry picked from commit 1d01a67)
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Current Behavior
The
@nx/dependency-checkslint rule detectstslibas a required dependency by checking if the build command containstsc(via/\btsc\b/regex). When a project usestsgoas its compiler, the build command istsgo --buildwhich doesn't match — causing a false positive "tslib is not used" lint error.Expected Behavior
The regex also matches
tsgo, so projects using eithertscortsgocorrectly detecttslibas needed whenimportHelpers: trueis set.Related Issue(s)
N/A — discovered while enabling tsgo for the nx package