nx
nx copied to clipboard
fix(linter): log transpilation errors of workspace rules
Current Behavior
Currently, transpilation-related errors of workspace rules are swallowed, so if you run npx eslint you will get not-so-informative:
> npx eslint
C:\project\src\main.js
1:1 error Definition for rule '@nx/workspace-example was not found @nx/workspace-example
✖ 1 problem (1 error, 0 warnings)
Expected Behavior
I'd expected to see the error and a stacktrace like this:
> npx eslint
TypeError: Cannot read properties of undefined (reading '_events')
at _addListener (node:events:549:19)
at addListener (node:events:606:10)
at Object.<anonymous> (C:\project\tools\eslint-rules\rules\examplets:18:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._compile (C:\project\node_modules\pirates\lib\index.js:117:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Object.newLoader [as .ts] (C:\project\node_modules\pirates\lib\index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
C:\project\src\main.js
1:1 error Definition for rule '@nx/workspace-example was not found @nx/workspace-example
✖ 1 problem (1 error, 0 warnings)
Related Issue(s)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nx-dev | ⬜️ Ignored (Inspect) | Visit Preview | May 1, 2024 2:01pm |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 429225bd82604b73fde55473378bcc691661ef43. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 6 targets
nx affected --targets=e2e,e2e-ci --base=22ef42a475f14fdc8734a9d21f73d42f05f1f28e --head=429225bd82604b73fde55473378bcc691661ef43 --parallel=1nx affected --targets=lint,test,build --base=22ef42a475f14fdc8734a9d21f73d42f05f1f28e --head=429225bd82604b73fde55473378bcc691661ef43 --parallel=3nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dtenx-cloud record -- nx format:check --base=22ef42a475f14fdc8734a9d21f73d42f05f1f28e --head=429225bd82604b73fde55473378bcc691661ef43nx documentation --no-dtenx affected -t e2e-macos-ci --parallel=1 --base=22ef42a475f14fdc8734a9d21f73d42f05f1f28e --head=429225bd82604b73fde55473378bcc691661ef43
Sent with 💌 from NxCloud.
Thanks a lot for this @Den-dp, I'm very sorry for how long it took to get merged
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.