Skip to main content

๐Ÿ’… Prettier support

Sheriff tries to incorporate Prettier out-of-the-box.

Setupโ€‹

The create-sheriff-config command will spin up for you a default .prettierrc.json configuration. You can modify it if you need to, but it is discouraged. Act with caution.

If you don't use the create-sheriff-config command, you will have to provide a prettier config yourself. Also don't forget the .prettierignore file.

If you already have a Prettier config in your project, you are good to go. The create-sheriff-config command won't create a new Prettier config, nor will attempt to modify the existing one.

Usageโ€‹

By design, Sheriff doesn't incorporate:

Instead, for your local editing experience, it's recommended to install the Prettier editor extension.
If you want to enforce Prettier at pre-commit stage, see the official docs.
To enforce Prettier in CI, see the CLI docs.