Skip to content

no-implicit-injections has bugs when auto-fixing #2154

@elwayman02

Description

@elwayman02
  1. The added service injection doesn't format properly - it removes indents from the existing line it's inserted above
    Injection formatting

  2. The autofix tries to import the service decorator at the top of the file. It not only does so using the old deprecated syntax { inject as service }, but it fails to detect when the expected modern import { service } already exists and ends up incorrectly duplicating the imports.

Duplicate Import 1
Duplicate Import 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions