Skip to content

Migrate constructor DI to inject() (@angular-eslint/prefer-inject) #710

Description

@fpigeonjr

Parent

#580

What to build

Migrate constructor-based dependency injection to the inject() function across the library's component/directive/service areas, resolving the @angular-eslint/prefer-inject warnings introduced by the Angular 19→20 step (angular-eslint 20's tsRecommended config newly includes this rule as of #574).

This rule accounts for 142 of the 1675 warnings currently reported in the root workspace (baseline temporarily raised from 1619 to 1675 in #574 to unblock the Angular 20 upgrade without silently absorbing new debt or hand-editing the ratchet file outside its documented --bump path). It was not present in the pre-upgrade baseline at all (0 → 142), so all of it is attributable to the angular-eslint version bump rather than pre-existing debt.

Acceptance criteria

  • Constructor-parameter DI is converted to inject() calls across independently reviewable component areas
  • Public exports and frozen deep-import paths remain intact
  • Relevant component tests and the full test-app suite remain green
  • @angular-eslint/prefer-inject is promoted to an error once its debt reaches zero
  • The warning baseline is lowered to reflect the cleanup

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    angular-upgradeAngular version upgrade epic (IAEMOD-57412)maintenanceRepo maintenance / tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions