Generate fails when there is a lint target without eslintConfig
option at a root project.json
#18544
Labels
eslintConfig
option at a root project.json
#18544
Current Behavior
When creating a new NX plugin, if the
project.json
at the root of the repository contains alint
target that doesn't contain the optioneslintConfig
, and there is no.eslintrc.base.json
at the root, then generation of a new plugin fails.In other words, running:
Leads to an error (see failure logs below).
When looking at the code (function
findLintTarget
), I saw that NX is looking for targets calledlint
or targets with executor@nx/linter:eslint
. This breaks the assumption that we can call targets however we want, and add whatever executors we want to them.Expected Behavior
Running the
nx g plugin my-plugin ...
command simply generates a new NX plugin without checking so many details about the structure of my repo.I unfortunately don't know the NX codebase well enough to suggest a change, but I would avoid mixing migration with plugin generation. They seem two very different topics from a high level perspective.
GitHub Repo
No response
Steps to Reproduce
project.json
at the rootlint
target to it, such as:"lint": { "executor": "nx:noop" }
.eslintrc.base.json
at root levelnx g @nx/plugin:plugin my-plugin
Nx Report
Failure Logs
The text was updated successfully, but these errors were encountered: