ember-cli / ember-cli/eslint-plugin-ember

New Rule: `no-simple-alias`

Open
#1,122 1 comment 0 reactions 0 assignees View on GitHub
enhancement New Rule
Dominant language
JavaScript
Stars
263
Forks
214
Avg merge
30m
Merged PRs (30d)
5

Description

A new rule disallowing `oneWay` `reads` and `readOnly` off of another prop on the same context.

```js
import Component from '@glimmer/component';
import { oneWay, reads, readOnly } from '@ember/object/computed';

export default MyComponent extends Component {
aProp = true;

// BAD
@oneWay('aProp') oneWayProp;
@reads('aProp') readsProp;
@readOnly('aProp') readOnlyProp;

// OK
@oneWay('args.aProp') oneWayProp;
@reads('args.aProp') readsProp;
@readOnly('args.aProp') readOnlyProp;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.