nx icon indicating copy to clipboard operation
nx copied to clipboard

fix(linter): log transpilation errors of workspace rules

Open Den-dp opened this issue 1 year ago • 2 comments

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)

Den-dp avatar Feb 01 '24 21:02 Den-dp

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

vercel[bot] avatar Feb 01 '24 21:02 vercel[bot]

Thanks a lot for this @Den-dp, I'm very sorry for how long it took to get merged

JamesHenry avatar May 11 '24 10:05 JamesHenry

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[bot] avatar May 18 '24 00:05 github-actions[bot]