Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[prefer-on-push-component-change-detection] Report and autofix redundant explicit OnPush #3123

Copy link
Copy link

Description

@aleesaan
Issue body actions

Feature request

In Angular v22 OnPush became the default change detection, so explicit changeDetection: ChangeDetectionStrategy.OnPush is now redundant.
prefer-on-push-component-change-detection currently flags Eager/Default with a suggestion, but doesn't report explicit OnPush.

Proposal

Add an option (e.g. reportRedundantOnPush, defaulting to false to make it opt-in) that flags explicit OnPush assignments and can autofix it.
If you guys agree, I can open a PR for this.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginAngular-specific TypeScript rulesAngular-specific TypeScript rulestriageThis issue needs to be looked at and categorized by a maintainerThis issue needs to be looked at and categorized by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.