question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.flat / .flatMap Rule Duplication

See original GitHub issue

First 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
EvgenyOrekhovcommented, Feb 5, 2022

Released in v24.0.0.

1reaction
EvgenyOrekhovcommented, Jan 23, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found