Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prefer-flat-map: Report for common concat pattern (#323)
- Loading branch information
1 parent
0fb6fcf
commit c2b8e76
Showing
3 changed files
with
75 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ This rule is fixable. | |
|
||
```js | ||
[1, 2, 3].map(i => [i]).flat(); | ||
[].concat(...foo.map((i) => i)) | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters