Skip to content

Commit a7fbc0b

Browse files
fix: deduplicate blockESLint ignore lines
1 parent 4e379b1 commit a7fbc0b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/blocks/blockESLint.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ export const blockESLint = base.createBlock({
7171
a.replace(/.+from/, "").localeCompare(b.replace(/.+from/, "")),
7272
);
7373

74-
const ignoreLines = ["lib", "node_modules", "pnpm-lock.yaml", ...ignores]
75-
.map((ignore) => JSON.stringify(ignore))
76-
.sort();
74+
const ignoreLines = Array.from(
75+
new Set(
76+
["lib", "node_modules", "pnpm-lock.yaml", ...ignores].map((ignore) =>
77+
JSON.stringify(ignore),
78+
),
79+
),
80+
).sort();
7781

7882
const extensionLines = [
7983
printExtension({

0 commit comments

Comments
 (0)