ember-cli / ember-cli/eslint-plugin-ember
False positives for `ember/use-ember-get-and-set`
- Dominant language
- JavaScript
- Stars
- 263
- Forks
- 214
- Avg merge
- 30m
- Merged PRs (30d)
- 5
Description
When using structures that like TrackedMap or URLSearchParams, which have getters, the lint rule identifies this as a violation.
Ex:
`ember/use-ember-get-and-set `
```js
import { TrackedMap } from 'tracked-built-ins'; // https://www.npmjs.com/package/tracked-built-ins
class CustomNavigationContextRouterService extends Service {
someMap = new TrackedMap();
@service('router')
router;
someMapMethod() {
const value = someMap.get('someKey'); // violation
// do stuff
}
someURLParamsMethod() {
const urlParamString = this.router.currentURL.split('?').pop();
const urlParams = new URLSearchParams(urlParamString);
const value = urlParams.get('someParamKey'); // violation
// do stuff
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.