Skip to content

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

License

Notifications You must be signed in to change notification settings

pycontribs/mirrors-prettier

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettier mirror

This is a fork of the (now archived) https://github.com/pre-commit/mirrors-prettier with the only difference being that it only references release versions of prettier, not e.g. alpha/beta versions.

Mirror of prettier package for pre-commit.

For pre-commit: see https://github.com/pre-commit/pre-commit

For prettier: see https://github.com/prettier/prettier

Using prettier with pre-commit

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

-   repo: https://github.com/pre-commit/mirrors-prettier
    rev: ''  # Use the sha / tag you want to point at
    hooks:
    -   id: prettier

note: only prettier versions >= 2.1.0 are supported

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

-   repo: https://github.com/pre-commit/mirrors-prettier
    rev: ''  # Use the sha / tag you want to point at
    hooks:
    -   id: prettier
        additional_dependencies:
        -   [email protected]
        -   '@prettier/[email protected]'

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

Packages

No packages published