Skip to content

fix(js): recognize tsgo in dependency-checks lint rule#35048

Merged
FrozenPandaz merged 1 commit into
masterfrom
fix/tsgo-dependency-checks
Mar 27, 2026
Merged

fix(js): recognize tsgo in dependency-checks lint rule#35048
FrozenPandaz merged 1 commit into
masterfrom
fix/tsgo-dependency-checks

Conversation

@FrozenPandaz

Copy link
Copy Markdown
Contributor

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

@netlify

netlify Bot commented Mar 27, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit f587a5c
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69c6d64780f14a000813742f
😎 Deploy Preview https://deploy-preview-35048--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 27, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit f587a5c
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69c6d6470ba0fd0008265a34
😎 Deploy Preview https://deploy-preview-35048--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit f587a5c

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 56m 37s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 8s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 7s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-27 20:12:22 UTC

@FrozenPandaz FrozenPandaz marked this pull request as ready for review March 27, 2026 19:09
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner March 27, 2026 19:09
@FrozenPandaz FrozenPandaz requested a review from AgentEnder March 27, 2026 19:09
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.
@FrozenPandaz FrozenPandaz force-pushed the fix/tsgo-dependency-checks branch from 5e8ab73 to f587a5c Compare March 27, 2026 19:11
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) March 27, 2026 19:13
@FrozenPandaz FrozenPandaz merged commit 1d01a67 into master Mar 27, 2026
24 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/tsgo-dependency-checks branch March 27, 2026 20:12
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)
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants