Enable unicorn/prefer-array-from-map rule (#19376)
This commit is contained in:
1 parent
623e101fd3
commit
e9aa8e53c4
2 files changed
+4
-3
No files matched your search
@@ -334,7 +334,6 @@ const configs = [
|
|||||||
"unicorn/no-global-object-property-assignment": "off",
|
"unicorn/no-global-object-property-assignment": "off",
|
||||||
"unicorn/prefer-await": "off",
|
"unicorn/prefer-await": "off",
|
||||||
"unicorn/no-top-level-side-effects": "off",
|
"unicorn/no-top-level-side-effects": "off",
|
||||||
"unicorn/prefer-array-from-map": "off",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
linterOptions: {
|
linterOptions: {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
const snippets = [
|
const snippets = [
|
||||||
{
|
{
|
||||||
name: "Should ignore single trailing space after han before New Line before han",
|
name: "Should ignore single trailing space after han before New Line before han",
|
||||||
code: Array.from({ length: 6 })
|
code: Array.from(
|
||||||
|
{ length: 6 },
|
||||||
// less "文" <= [..., "文...文 ", "文...文", ...] => more "文"
|
// less "文" <= [..., "文...文 ", "文...文", ...] => more "文"
|
||||||
.map((_, i) => ["文".repeat(39 + (i >> 1)), i & 1 ? "" : " "])
|
(_, i) => ["文".repeat(39 + (i >> 1)), i & 1 ? "" : " "],
|
||||||
|
)
|
||||||
// ["<Line #1>", "<L2>", ...]
|
// ["<Line #1>", "<L2>", ...]
|
||||||
.reduce(
|
.reduce(
|
||||||
(previousInputLines, [base, space]) => [
|
(previousInputLines, [base, space]) => [
|
||||||
|
|||||||
Reference in new issue
Block a user