Replies: 4 comments 1 reply
-
I realized this is by design https://github.com/eslint/eslint/blob/main/lib/config/flat-config-helpers.js#L25-L29 to support plugin names such as Additionally, the logic above seems a bit odd as it converts string like
How can can plugin be named
which would map above string to:
|
Beta Was this translation helpful? Give feedback.
-
Yes, you can't have a plugin namespace of |
Beta Was this translation helpful? Give feedback.
-
Yes, we use the
And I have renamed the old Can you comment on my second message @nzakas? How come is
The tests explicitly check this, so it must be intentional. That 3-segment name doesn't seem to be valid, though. |
Beta Was this translation helpful? Give feedback.
-
Feel free to change this from |
Beta Was this translation helpful? Give feedback.
-
Environment
Node version: v20
npm version: v10
Local ESLint version: 8.48.0
Global ESLint version: -
Operating System: MacOS Ventura (M1)
What parser are you using?
Default (Espree)
What did you do?
We have an ESlint plugin that dynamically adds users' rules as a nested rules using the convention
@nx/workspace/{ruleName}
. All the other static rules follow the typical convention@nx/{ruleName}
.You can see the code for it here:
https://github.com/nrwl/nx/blob/master/packages/eslint-plugin/src/index.ts#L40
What did you expect to happen?
This works fine with old configs/CLI.
What actually happened?
Running the same plugin with flat configs and environment flag returns following error:
Link to Minimal Reproducible Example
https://github.com/beaussan/repro-nx-workspace-rule-with-flat-config
Participation
Additional comments
Changing resolution logic to name dynamic rules like
@nx/workspace-{ruleName}
works. Is this accidental omission on ESLint's side or are the nested rules names not supported anymore?Beta Was this translation helpful? Give feedback.
All reactions