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

Add decorator support to require-computed-property-dependencies rule #779

Merged
merged 1 commit into from
Apr 14, 2020
Merged

Add decorator support to require-computed-property-dependencies rule #779

merged 1 commit into from
Apr 14, 2020

Conversation

bmish
Copy link
Member

@bmish bmish commented Apr 14, 2020

This updates the require-computed-property-dependencies rule to catch and autofix missing dependent keys when using the @computed decorator in native classes (modern Ember Octane syntax #560 #566).

Before:

class Test {
  @computed('first')
  get fullName() { return this.first + ' ' + this.last; }
}

After:

class Test {
  @computed('first', 'last')
  get fullName() { return this.first + ' ' + this.last; }
}

@bmish bmish changed the title Handle decorators in require-computed-property-dependencies rule Add decorator support to require-computed-property-dependencies rule Apr 14, 2020
This updates the `require-computed-property-dependencies` rule to catch and autofix missing dependent keys when using the `@computed` decorator in native classes.
@bmish bmish merged commit c42a20c into ember-cli:master Apr 14, 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