Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andrei-gheorghiu opened this issue Aug 23, 2020 · 1 comment · Fixed by #1283
Closed

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

andrei-gheorghiu opened this issue Aug 23, 2020 · 1 comment · Fixed by #1283
Labels

Comments

@andrei-gheorghiu
Copy link

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().

@ota-meshi
Copy link
Member

Thank you for this issue.

However, it seems to be fixed in v7.0.0-beta. Please you use v7.0.0-beta.
Perhaps it was unintentionally fixed by refactoring #1154, that change to uses the same logic as no-mutating-props rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants