NiklasPor / prettier-plugin-go-template

Fixes prettier formatting for go templates 🐹

Home Page:prettier-plugin-go-template-niklaspor.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use With Pre-commit hooks

pourmand1376 opened this issue · comments

Hi, Thanks for creating this great repo.

I want to have a pre-commit hook which formats my html files whenever I commit to my repository. How should I use your plugin with pre-commit?

Normally a config like the following would work:

  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "v3.0.3"
    hooks:
      - id: prettier
        additional_dependencies:
          - "prettier@3.0.3"
          - "prettier-plugin-go-template"

But when I do this I get [error] Cannot find package 'prettier-plugin-go-template' imported from /home/gk/blog/noop.js