Skip to content

[BUG] require-computed-macros can autofix to self-referential macros #1118

@runspired

Description

@runspired

Given the following (admittedly incorrect) computed usage

storeIds: computed("storeIds", "line", function() {
        return this.storeIds;
    }),

This rule will convert it to the following, which blows up since the self-referential nature becomes more evident when an alias is installed under the hood.

storeIds: computed.reads('storeIds')

A better conversion would be

storeIds: null

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions