.pre-commit-config.yaml: use the local hook for prettier

This commit is contained in:
Aminda Suomalainen 2024-06-06 16:51:01 +03:00
parent aea53e0c57
commit 358e3e7f43
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 20 additions and 9 deletions

View File

@ -5,6 +5,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.ci for more information
ci:
skip: [pnpm-prettier]
# I don't need so many duplicated notifications on the same thing as I keep
# autoupdating manually too. Besides it just creates extra branch I never
# touch.
@ -73,16 +74,26 @@ repos:
- id: reuse
exclude: ^.cache\/.*$
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.1"
# - repo: https://github.com/rbubley/mirrors-prettier
# rev: "v3.3.1"
# hooks:
# - id: prettier
# additional_dependencies: [
# # https://www.npmjs.com/package/prettier
# "prettier@3.3.1",
# # https://www.npmjs.com/package/@prettier/plugin-xml
# "@prettier/plugin-xml@3.4.1",
# ]
- repo: local
hooks:
- id: prettier
additional_dependencies: [
# https://www.npmjs.com/package/prettier
"prettier@3.3.1",
# https://www.npmjs.com/package/@prettier/plugin-xml
"@prettier/plugin-xml@3.4.1",
]
- id: pnpm-prettier
name: prettier
entry: pnpm exec prettier --write
language: system
# Better handled by pretty-format-json from pre-commit-hooks.
# Remember to have *.json in .prettierignore!
exclude_types: [json]
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"