base

base > docs > development > Using Prettier

Prettier for Code Formatting

Prettier is an opinionated code formatter that enforces a consistent code style across the entire project. This repository uses Prettier in two ways:

Linting with GitHub Actions

This repository includes a CI workflow that automatically checks for formatting issues on every pull request.

Manual Formatting Workflow

For convenience, this repository also includes a manual formatting workflow that you can trigger from the Actions tab in GitHub.

Manual Formatting

While the automated workflow handles formatting on the server, it’s a good practice to run Prettier locally as you work.

Installation

This repository includes Prettier as a development dependency in package.json. To install it, run:

npm install

The repository also includes a .prettierrc configuration file, so you don’t need to create one.

Usage

You can run Prettier from the command line to format your files.

For more detailed information on using Prettier, refer to the official Prettier documentation.