Skip to content

mirror of the `prettier` npm package for pre-commit

License

Notifications You must be signed in to change notification settings

ComPWA/prettier-pre-commit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-commit mirror for Prettier

Note

This fork is a continuation of github.com/pre-commit/mirrors-prettier.

Mirror of the Prettier formatter for pre-commit.

Using prettier with pre-commit

Add this to your .pre-commit-config.yaml:

  - repo: https://github.com/ComPWA/prettier-pre-commit
    rev: v3.3.3
    hooks:
      - id: prettier

When using Prettier plugins, you'll need to declare them under additional_dependencies. For example:

  - repo: https://github.com/ComPWA/prettier-pre-commit
    rev: v3.3.3
    hooks:
      - id: prettier
        additional_dependencies:
          - prettier@3.3.3
          - '@prettier/plugin-xml@3.4.1'

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]

About

mirror of the `prettier` npm package for pre-commit

Resources

License

Stars

Watchers

Forks