Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace format:write to format --write #815

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ It should be applied automatically when you save files in VS Code or make a Git
To manually reformat all files, you can run:

```shell
pnpm format:write
pnpm format --write
```

## Linting
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
"scripts": {
"build": "tsup",
"format": "prettier \"**/*\" --ignore-unknown",
"format:write": "pnpm format --write",
"initialize": "tsx ./src/bin/index.js --mode initialize",
"lint": "eslint . .*js --max-warnings 0",
"lint:knip": "knip",
4 changes: 2 additions & 2 deletions src/steps/finalizeDependencies.test.ts
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ describe("finalize", () => {
"npx all-contributors-cli generate",
],
[
"pnpm run format:write",
"pnpm run format --write",
],
]
`);
@@ -89,7 +89,7 @@ describe("finalize", () => {
"pnpm add @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest eslint-config-prettier@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-import@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",
"pnpm run format --write",
],
]
`);
2 changes: 1 addition & 1 deletion src/steps/finalizeDependencies.ts
Original file line number Diff line number Diff line change
@@ -75,5 +75,5 @@ export async function finalizeDependencies(options: Options) {
);
}

await execaCommand("pnpm run format:write");
await execaCommand("pnpm run format --write");
}
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ describe("createDevelopment", () => {
To manually reformat all files, you can run:
\`\`\`shell
pnpm format:write
pnpm format --write
\`\`\`
## Linting
@@ -191,7 +191,7 @@ describe("createDevelopment", () => {
To manually reformat all files, you can run:
\`\`\`shell
pnpm format:write
pnpm format --write
\`\`\`
## Linting
2 changes: 1 addition & 1 deletion src/steps/writing/creation/dotGitHub/createDevelopment.ts
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ It should be applied automatically when you save files in VS Code or make a Git
To manually reformat all files, you can run:
\`\`\`shell
pnpm format:write
pnpm format --write
\`\`\`
## Linting
4 changes: 2 additions & 2 deletions src/steps/writing/creation/writePackageJson.test.ts
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ describe("writePackageJson", () => {
"scripts": {
"build": "tsup",
"format": "prettier \\"**/*\\" --ignore-unknown",
"format:write": "pnpm format --write",
"format --write": "pnpm format --write",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanexQ this is still buggy - it should be removed.

"lint": "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
"lint:knip": "knip",
"lint:md": "markdownlint \\"**/*.md\\" \\".github/**/*.md\\" --rules sentences-per-line",
@@ -174,7 +174,7 @@ describe("writePackageJson", () => {
"scripts": {
"build": "tsup",
"format": "prettier \\"**/*\\" --ignore-unknown",
"format:write": "pnpm format --write",
"format --write": "pnpm format --write",
"lint": "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
"prepare": "husky install",
"tsc": "tsc",
2 changes: 1 addition & 1 deletion src/steps/writing/creation/writePackageJson.ts
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ export async function writePackageJson(options: Options) {
scripts: {
build: "tsup",
format: 'prettier "**/*" --ignore-unknown',
"format:write": "pnpm format --write",
"format --write": "pnpm format --write",
lint: "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
...(!options.excludeLintKnip && {
"lint:knip": "knip",