Skip to content

Commit 0da6188

Browse files
chore: fix newlines for some blocks
1 parent 1fb4791 commit 0da6188

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

Diff for: src/next/blocks/blockESLint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function printExtensionRules(rules: z.infer<typeof zExtensionRules>) {
244244
return [
245245
"{",
246246
...rules.flatMap((group) => [
247-
group.comment ? `// ${group.comment}\n` : "",
247+
group.comment ? `\n\n// ${group.comment}\n` : "",
248248
...Object.entries(group.entries).map(
249249
([ruleName, options]) => `"${ruleName}": ${JSON.stringify(options)},`,
250250
),

Diff for: src/next/blocks/blockPrettier.test.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ describe("blockPrettier", () => {
8888
],
8989
"files": {
9090
".husky": {
91-
".gitignore": "_",
91+
".gitignore": "_
92+
",
9293
"pre-commit": [
93-
"npx lint-staged",
94+
"npx lint-staged
95+
",
9496
{
9597
"mode": 1911,
9698
},
@@ -197,9 +199,11 @@ describe("blockPrettier", () => {
197199
],
198200
"files": {
199201
".husky": {
200-
".gitignore": "_",
202+
".gitignore": "_
203+
",
201204
"pre-commit": [
202-
"npx lint-staged",
205+
"npx lint-staged
206+
",
203207
{
204208
"mode": 1911,
205209
},
@@ -323,9 +327,11 @@ describe("blockPrettier", () => {
323327
],
324328
"files": {
325329
".husky": {
326-
".gitignore": "_",
330+
".gitignore": "_
331+
",
327332
"pre-commit": [
328-
"npx lint-staged",
333+
"npx lint-staged
334+
",
329335
{
330336
"mode": 1911,
331337
},

Diff for: src/next/blocks/blockPrettier.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ pnpm format --write
9393
],
9494
files: {
9595
".husky": {
96-
".gitignore": "_",
97-
"pre-commit": ["npx lint-staged", { mode: 0x777 }],
96+
".gitignore": "_\n",
97+
"pre-commit": ["npx lint-staged\n", { mode: 0x777 }],
9898
},
9999
".prettierignore": ["/.husky", "/lib", "/pnpm-lock.yaml", ...ignores]
100100
.sort()

Diff for: src/steps/writing/creation/createDotGitignore.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe("createDotGitignore", () => {
1010
"/coverage
1111
/lib
1212
/node_modules
13+
1314
"
1415
`);
1516
});
@@ -20,6 +21,7 @@ describe("createDotGitignore", () => {
2021
expect(actual).toMatchInlineSnapshot(`
2122
"/lib
2223
/node_modules
24+
2325
"
2426
`);
2527
});

0 commit comments

Comments
 (0)