发布

  • fix(linter): install angular-eslint when converting Angular configs to flat config (#36160)

    frostbyte_neo 发布于 2026-06-30 19:04:36 +00:00

    Current Behavior

    The @nx/eslint:convert-to-flat-config generator converts ESLint
    configs that extend the @nx/angular preset into flat config that
    spreads nx.configs['flat/angular']. That preset imports the umbrella
    angular-eslint package 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.1 convert-to-flat-config migration) then
    fails to lint with Cannot find module 'angular-eslint'.

    Expected Behavior

    When the converted config references the flat/angular preset, the
    generator adds angular-eslint to devDependencies, pinned to the
    @angular-eslint major already installed in the workspace (falling back
    to the latest major nx generates). The converted workspace lints
    cleanly.


    View session information

    下载附件