cookie icon indicating copy to clipboard operation
cookie copied to clipboard

Deprecate `prettier` pre-commit hook

Open ariostas opened this issue 1 year ago • 2 comments

The prettier pre-commit hook has been deprecated and the repo has been archived since prettier made some breaking changes.

ariostas avatar Jun 10 '24 00:06 ariostas

They have some alternatives here, but none of them seem particularly convenient.

ariostas avatar Jun 10 '24 02:06 ariostas

I'm using

  - repo: https://github.com/rbubley/mirrors-prettier
    rev: "v3.3.2"
    hooks:
      - id: prettier
        types_or: [yaml, markdown, html, css, scss, javascript] #, json]
        args: [--prose-wrap=always]

this seems to be maintained for now...

kratsg avatar Jun 12 '24 19:06 kratsg

The convenient thing about the above mirror is that it also only tags non-pre-release versions so that the weekly struggle of reverting the pre-commit autoupdate from the 4.x pre-release version to the latest 3.x stable release is eliminated.

Would it be okay for sp-repo-review to recommend the alternative mirror? Or could the check for the presence of prettier in the pre-commit config be loosened up so that it passes as long as the URL matches https://github.com/*/mirrors-prettier?

burgholzer avatar Aug 05 '24 12:08 burgholzer

We can list popular mirrors, and eventually start recommending one. #460 makes this easier.

henryiii avatar Aug 05 '24 16:08 henryiii

Done in both #461 and fully moved in #476.

henryiii avatar Aug 20 '24 04:08 henryiii