Skip to content

Commit f425b39

Browse files
feat: prettier@3 (#611)
Replaces #595. Pulls in JoshuaKGoldberg/prettier-plugin-curly#41. Fixes #612.
1 parent cc4ddcc commit f425b39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+155
-160
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"js-yaml": "^4.1.0",
5151
"npm-user": "^5.0.1",
5252
"octokit": "^3.0.0",
53-
"prettier": "^2.8.8",
53+
"prettier": "^3.0.0",
5454
"replace-in-file": "^7.0.0",
5555
"title-case": "^3.0.3"
5656
},
@@ -90,7 +90,7 @@
9090
"markdownlint-cli": "^0.35.0",
9191
"npm-package-json-lint": "^7.0.0",
9292
"npm-package-json-lint-config-default": "^6.0.0",
93-
"prettier-plugin-curly": "^0.1.0",
93+
"prettier-plugin-curly": "^0.1.2",
9494
"prettier-plugin-packagejson": "^2.4.3",
9595
"release-it": "^16.0.0",
9696
"sentences-per-line": "^0.2.1",

pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/hydrate-test-e2e.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const { stdout: gitStatus } = await $`git status`;
1515
console.log(`Stdout from running \`git status\`:\n${gitStatus}`);
1616

1717
const indexOfUnstagedFilesMessage = gitStatus.indexOf(
18-
"Changes not staged for commit:"
18+
"Changes not staged for commit:",
1919
);
2020
if (indexOfUnstagedFilesMessage === -1) {
2121
throw new Error(
22-
`Looks like hydrate didn't cause any file changes? That's ...probably incorrect? 😬`
22+
`Looks like hydrate didn't cause any file changes? That's ...probably incorrect? 😬`,
2323
);
2424
}
2525

@@ -55,7 +55,7 @@ if (unstagedModifiedFiles.length) {
5555
console.log(
5656
`Stdout from running \`${gitDiffCommand}\`:\n${
5757
(await execaCommand(gitDiffCommand)).stdout
58-
}`
58+
}`,
5959
);
6060
console.error(
6161
[
@@ -70,7 +70,7 @@ if (unstagedModifiedFiles.length) {
7070
"the corresponding template and update those as well.",
7171
]
7272
.map((line) => chalk.red(line))
73-
.join("\n")
73+
.join("\n"),
7474
);
7575
process.exitCode = 1;
7676
}

script/setup-test-e2e.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ await $({
1414
})`node ./lib/setup/index.js --description ${description} --owner ${owner} --title ${title} --repository ${repository} --skip-api --skip-restore`;
1515

1616
const newPackageJson = JSON.parse(
17-
(await fs.readFile("./package.json")).toString()
17+
(await fs.readFile("./package.json")).toString(),
1818
);
1919
console.log("New package JSON:", newPackageJson);
2020

@@ -33,7 +33,7 @@ for (const search of [
3333
const { stdout } = await $`grep -i ${search} ${files}`;
3434
assert.equal(
3535
stdout,
36-
`README.md:> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [template-typescript-node-package](https://github.com/JoshuaKGoldberg/template-typescript-node-package).`
36+
`README.md:> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [template-typescript-node-package](https://github.com/JoshuaKGoldberg/template-typescript-node-package).`,
3737
);
3838
}
3939

src/hydrate/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ export async function hydrate(args: string[]) {
3737

3838
await withSpinner(
3939
() => writeStructure(hydrationValues),
40-
"writing new repository structure"
40+
"writing new repository structure",
4141
);
4242

4343
await withSpinner(
4444
() => writeReadme(hydrationValues),
45-
"writing README.md"
45+
"writing README.md",
4646
);
4747

4848
if (hydrationSkips["skip-install"]) {
4949
skipSpinnerBlock(`Skipping package installations.`);
5050
} else {
5151
await withSpinner(
5252
() => finalizeDependencies(hydrationValues),
53-
"finalizing dependencies"
53+
"finalizing dependencies",
5454
);
5555
}
5656

src/hydrate/steps/finalizeDependencies.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe("finalize", () => {
5151
"yaml-eslint-parser@latest",
5252
"-D",
5353
].join(" "),
54-
{ stdio: "inherit" }
54+
{ stdio: "inherit" },
5555
);
5656
});
5757

@@ -101,7 +101,7 @@ describe("finalize", () => {
101101
"vitest@latest",
102102
"-D",
103103
].join(" "),
104-
{ stdio: "inherit" }
104+
{ stdio: "inherit" },
105105
);
106106
});
107107
});

src/hydrate/steps/finalizeDependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function finalizeDependencies({
5151
"console-fail-test",
5252
"eslint-plugin-no-only-tests",
5353
"eslint-plugin-vitest",
54-
"vitest"
54+
"vitest",
5555
);
5656
}
5757

src/hydrate/steps/runCommand.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe("runCommand", () => {
4242
chalk.yellow(`⚠️ Running \``),
4343
chalk.yellowBright("command"),
4444
chalk.yellow(`\` failed. You should run it and fix its complaints.`),
45-
].join("")
45+
].join(""),
4646
);
4747
});
4848
});

src/hydrate/steps/runCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function runCommand(command: string, label: string) {
2121
chalk.yellow(`⚠️ Running \``),
2222
chalk.yellowBright(command),
2323
chalk.yellow(`\` failed. You should run it and fix its complaints.`),
24-
].join("")
24+
].join(""),
2525
);
2626
}
2727
}

src/hydrate/steps/writeReadme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function writeReadme(values: HydrationInputValues) {
2828
if (!contents) {
2929
await fs.writeFile(
3030
"README.md",
31-
[generateTopContent(values), allContributorsContent].join("\n\n")
31+
[generateTopContent(values), allContributorsContent].join("\n\n"),
3232
);
3333
return;
3434
}

0 commit comments

Comments
 (0)