ember-cli / ember-cli/eslint-plugin-ember
New Rule: no-self-referencing-properties
- Dominant language
- JavaScript
- Stars
- 263
- Forks
- 214
- Avg merge
- 30m
- Merged PRs (30d)
- 5
Description
This rule would catch the issue that led to the bug in #1118
This rule would lint all macros as well as computed properties and getters for self-referential behavior. It would be applied to classic syntax as well as native syntax.
```js
import Component from '@ember/component';
import { computed } from '@ember/object';
import { reads } from '@ember/object/computed';
export default MyComponent extends Component {
// BAD
get foo() {
return this.foo;
}
// BAD
@computed('bar')
get bar() {
return this.bar;
}
// BAD
@computed('not-biz')
get biz() {
return this.biz;
}
// BAD
@reads('baz') baz;
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.