Note
This fork is a continuation of github.com/pre-commit/mirrors-prettier.
Mirror of the Prettier formatter for pre-commit.
Add this to your .pre-commit-config.yaml:
- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.8.0
hooks:
- id: prettierWhen using Prettier plugins, you'll need to declare them under additional_dependencies. For example:
- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.8.0
hooks:
- id: prettier
additional_dependencies:
- prettier@3.8.0
- '@prettier/plugin-xml@3.8.0'By default, all files are passed to prettier, if you want to limit the file list, adjust types / types_or / files:
- id: prettier
types_or: [css, javascript]