-
fix(linter): install angular-eslint when converting Angular configs to flat config (#36160)
发布于
2026-06-30 19:04:36 +00:00 Current Behavior
The
@nx/eslint:convert-to-flat-configgenerator converts ESLint
configs that extend the@nx/angularpreset into flat config that
spreadsnx.configs['flat/angular']. That preset imports the umbrella
angular-eslintpackage at runtime, but the generator never adds it to
the workspace. A workspace converted from a working eslintrc Angular
setup (for example by the 23.1convert-to-flat-configmigration) then
fails to lint withCannot find module 'angular-eslint'.Expected Behavior
When the converted config references the
flat/angularpreset, the
generator addsangular-eslintto devDependencies, pinned to the
@angular-eslintmajor already installed in the workspace (falling back
to the latest major nx generates). The converted workspace lints
cleanly.
下载附件