💅 Prettier support
Sheriff tries to incorporate prettier out-of-the-box.
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.
Sheriff comes with the rules of eslint-config-prettier out-of-the-box.
By design, Sheriff doesn't incorporate eslint-plugin-prettier. Its use is discouraged by the prettier team itself, as it just slows down your editor.
Instead, for your local editing experience, it's recommended to install a 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.