Skip to content

no-side-effects-in-computed false positives #1282

Closed
@andrei-gheorghiu

Description

@andrei-gheorghiu

What rule do you want to change?
https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-side-effects-in-computed-properties.md

Does this change cause the rule to produce more or fewer warnings?
Produces more warnings (false positives).

How will the change be implemented? (New option, new default behavior, etc.)?
It should not consider

 computed: {
    reversed() {
       return [...this.items].reverse()
    }
 }

a side effect, as it's not. It's pretty much the same as this.items.slice(0).reverse().

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