Skip to content

Commit

Permalink
fix: remove redundant format at end of finalizeDependencies (#887)
Browse files Browse the repository at this point in the history
## PR Checklist

- [x] Addresses an existing open issue: fixes #748
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

馃敧.

Also fixes a `lint --fix` command I found that was running after
formatting. Lint rule auto-fixers might introduce formatting issues, so
they should be run first.
  • Loading branch information
JoshuaKGoldberg committed Sep 25, 2023
1 parent 617dcc4 commit 973140d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion src/create/createWithOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export async function createWithOptions({ github, options }: GitHubAndOptions) {

await runCommands("Cleaning up files", [
"pnpm dedupe",
"pnpm format --write",
"pnpm lint --fix",
"pnpm format --write",
]);

const sendToGitHub =
Expand Down
6 changes: 0 additions & 6 deletions src/steps/finalizeDependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ describe("finalize", () => {
[
"npx all-contributors-cli generate",
],
[
"pnpm run format:write",
],
]
`);
});
Expand Down Expand Up @@ -94,9 +91,6 @@ describe("finalize", () => {
[
"pnpm add @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest tsup@latest typescript@latest -D",
],
[
"pnpm run format:write",
],
]
`);
});
Expand Down
2 changes: 0 additions & 2 deletions src/steps/finalizeDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,4 @@ export async function finalizeDependencies(options: Options) {
"-D",
);
}

await execaCommand("pnpm run format:write");
}

0 comments on commit 973140d

Please sign in to comment.