sf-food-trucks

Prettier Configuration

prettier

Installation

Use the package manager pnpm to install the prettier configuration and related packages in the root project.

pnpm add --save-dev --save-exact --workspace-root --workspace prettier-config
pnpm add --save-dev --save-exact --workspace-root prettier

Configuration

Create a prettier configuration file in ES module format. Import the configuration from prettier-config and export as default.

import baseConfig from 'prettier-config';
export default baseConfig;

Usage

Prettier can be integrated with editors, executed in the Git commit-msg hook to check or format staged files, and the CLI tool can be used directly or in scripts.

pnpm prettier *.* **/*.* --check