.flat / .flatMap Rule Duplication
See original GitHub issueFirst of all, thanks for this config! Learned about a lot of plugins 🙌
It seems like there may be some duplication of rules in the base config (see below). But not sure if this is something important to this project - if not, feel free to close 😃
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-flat": "error",
"array-func/prefer-flat-map": "error",
"array-func/prefer-flat": "error",
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
eslint-plugin-unicorn/prefer-array-flat-map.md at main - GitHub
🔧 This rule is automatically fixable by the --fix CLI option. Array#flatMap performs Array#map and Array#flat in one step.
Read more >flatMap, flat, flatten doesn't exist on type any[] - Stack Overflow
flat . So my code does run as expected. Unfortunately, TypeScript doesn't like it. // data.flatMap lint error export ...
Read more >Array.prototype.flatMap() - JavaScript - MDN Web Docs
The flatMap() method returns a new array formed by applying a given callback function to each element of the array, and then flattening...
Read more >flatMap | MuleSoft Documentation
Iterates over each item in an array and flattens the results. Instead of returning an array of arrays (as map does when you...
Read more >Trying to wrap my head around map vs flat map...and ... - Reddit
for each element(Int?) flatMap applies the function(which just returns its Int? input) and discards the Basket(optional) yielding Int. Then ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in v24.0.0.
@karlhorky I reviewed those
.flat()
/.flatMap()
rules. Unicorn’s rules cover more cases, so I disabled array-func’s rules. Will be released in the next version.