Skip to content

Catch assignment in no-side-effects rule #790

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

Merged
merged 1 commit into from
Apr 15, 2020
Merged

Catch assignment in no-side-effects rule #790

merged 1 commit into from
Apr 15, 2020

Conversation

bmish
Copy link
Member

@bmish bmish commented Apr 15, 2020

Updates no-side-effects rule to catch this.x = 123; assignments in computed property bodies. Part of supporting modern Ember Octane syntax.

Example:

computed("test", function() {
  this.x = 123; // disallowed because this causes a side effect
})

Related to #785.

@bmish bmish changed the title Catch ES5 setters in no-side-effects rule Catch assignment in no-side-effects rule Apr 15, 2020
@bmish bmish merged commit 51114c7 into ember-cli:master Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant