Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(linter): log transpilation errors of workspace rules #21503

Merged
merged 1 commit into from May 11, 2024

Conversation

Den-dp
Copy link
Contributor

@Den-dp Den-dp commented Feb 1, 2024

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 Den-dp requested a review from a team as a code owner February 1, 2024 21:06
@Den-dp Den-dp requested a review from meeroslav February 1, 2024 21:06
Copy link

vercel bot commented Feb 1, 2024

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

@JamesHenry JamesHenry merged commit 1ef6f27 into nrwl:master May 11, 2024
6 checks passed
@JamesHenry
Copy link
Collaborator

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

@Den-dp Den-dp deleted the fix/log-transpilaton-errors branch May 11, 2024 15:29
FrozenPandaz pushed a commit that referenced this pull request May 13, 2024
Copy link

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 May 18, 2024
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.

None yet

2 participants