Pre-commit hook to run prettier with plugins
  • JavaScript 100%
Find a file
2026-05-22 15:11:52 +02:00
.gitignore Initial commit 2026-04-13 19:34:47 +02:00
.pre-commit-config.yaml Configure pre-commit hooks 2026-05-22 15:11:52 +02:00
.pre-commit-hooks.yaml Initial commit 2026-04-13 19:34:47 +02:00
package.json Initial commit 2026-04-13 19:34:47 +02:00
README.md Initial commit 2026-04-13 19:34:47 +02:00
run-prettier.js Filter out unchanged file & warning about unknown options from prettier result 2026-05-22 15:03:06 +02:00

Pre-commit prettier

This project provide a pre-commit hook to run prettier with plugins on your project.

This hook handle installation of prettier in an environment manage by pre-commit. To use plugins, you have to add them in the additional_dependencies key on the hook in your .pre-commit-config.yaml and explicitly require its usage with an argument --plugin=....

Usage

---
repos:
  - repo: https://gitea.zionetrix.net/bn8/pre-commit-pylint.git
    rev: v3.8.2
    hooks:
      - id: prettier
        additional_dependencies:
          - "prettier@3.8.2"
          - "@prettier/plugin-php@0.25.0"
        args:
          - "--plugin=@prettier/plugin-php"