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

Specify command to run Prettier #1245

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Changes from 3 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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,16 @@ You can also check that API docs and translations render by using any of these a

CI will check on every PR that any changed files render correctly. We also run a weekly cron job to check that every page renders correctly.

## Format TypeScript files
## Format README and TypeScript files

If you're working on our support code in `scripts/`, run `npm run fmt` to automatically format the files.
Run `npm run fmt` to automatically format the README, `.github` folder, and `scripts/` folder. You should run this command if you get the error in CI `run Prettier to fix`.

To check that formatting is valid without actually making changes, run `npm run check:fmt` or `npm run check`.

## Prettier errors

If you get an error that tells you to `run Prettier to fix`, the command to do so is `npx prettier --write` or `npm run fmt` as mentioned in the [Format TypeScript files](#format-typescript-files) section. To run Prettier on a single file, you can do so with `npx prettier --write filename.md`.
Eric-Arellano marked this conversation as resolved.
Show resolved Hide resolved

abbycross marked this conversation as resolved.
Show resolved Hide resolved
## Regenerate an existing API docs version

This is useful when we make improvements to the API generation script.
Expand Down
Loading