Support resolving custom ESLint rules in projects outside of the workspace-rules-project mechanism
#32668
Replies: 4 comments
-
|
We were also hoping this could be accomplished in NX. Thanks for raising this feature request. |
Beta Was this translation helpful? Give feedback.
-
|
Do it :) |
Beta Was this translation helpful? Give feedback.
-
|
@koliveira15 thanks for the request! We're looking into this and will have updates soon. It can't be done as proposed (importing directly), but a helper would be provided to resolve the rules and would be used instead of a direct import. |
Beta Was this translation helpful? Give feedback.
-
|
This would be so convenient 🙏 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Support resolving custom ESLint rules outside of
workspace-rules-projectSummary
Allow Nx to resolve custom ESLint rule plugins from other projects in the repo without requiring:
workspace-rules-project(not meant for publishing)linttargets depending onbuildtargetsThis is especially important with ESLint v9 flat configs (
eslint.config.js) and when workspaces linking isn’t available.Problem
Today, if I put rules in
packages/my-package, I can’t reuse them in other project configs unless I:node_modules(either manually or vialintdependsOnbuildconfigurations)workspace-, which makes it difficult to know where the rule came from)Proposal
ESLint configs should import rules in the same workspace the same way a consumer of my package would:
Current workspace-rule resolution logic:
Beta Was this translation helpful? Give feedback.
All reactions