eslint-plugin-lodash
eslint-plugin-lodash copied to clipboard
New rule: prefer-native-method (Fixes #221)
Fixes #221
The new rule in its current state in this branch only works with map as a proof of concept.
The fix for this rule is unsafe as _.map() can accept any collection and not only Array. So it has the potential to break code such as:
_.map({ a: 'c', b: 'd' }, (v, k) => whatever(v, k))
Open to feedback about how to get this rule actually in a state where it could be merged. Thanks
Pull Request Test Coverage Report for Build 717
- 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.05%) to 99.947%
| Totals | |
|---|---|
| Change from base Build 715: | -0.05% |
| Covered Lines: | 1009 |
| Relevant Lines: | 1009 |
💛 - Coveralls
The fix could use optional chaining.
I'm not putting any effort into a PR that's been open since 2021 with no attention, but you can go ahead if you want