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

`no-deeply-nested-dependent-keys-with-each` rule should apply to computed macros that return an @each

Open
#578 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
263
Forks
214
Avg merge
30m
Merged PRs (30d)
5

Description

```javascript
filingRequestsUS: filterBy('filingRequests', 'data.country', 'US'),
// throws the runtime warning:
// WARNING: Dependent keys containing @each only work one level deep.
// You used the key "filingRequests.@each.data.country" which is invalid.
// Please create an intermediary computed property.
```
This throws a warning, but the lint rule does not catch it.

reduce_computed_macros that return an @each should trigger the lint rule as well.
https://github.com/emberjs/ember.js/blob/23bf7e97502b0f9bab0e90914f4c944dcb7b0975/packages/ember-runtime/lib/computed/reduce_computed_macros.js#L397
As far as I can tell, this is just `filterBy` and `mapBy`

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.