pre-commit & package.json: use corepack, install deps & merge local repo hooks to one local repo entry

This commit is contained in:
Aminda Suomalainen 2024-06-23 22:35:05 +03:00
parent 2414304e08
commit 6132460a7a
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 19 additions and 17 deletions

View File

@ -7,7 +7,7 @@ ci:
# the frequency of unnecessary PRs. # the frequency of unnecessary PRs.
# https://github.com/pre-commit-ci/issues/issues/83 # https://github.com/pre-commit-ci/issues/issues/83
autoupdate_schedule: quarterly autoupdate_schedule: quarterly
skip: [latexmk, exiftool, prettier] skip: [latexmk, exiftool, install-dev-deps, prettier]
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
@ -71,21 +71,18 @@ repos:
- repo: local - repo: local
hooks: hooks:
- id: install-dev-deps
name: Install pnpm dev dependencies
entry: corepack pnpm install -D
language: system
always_run: true
verbose: true
pass_filenames: false
- id: prettier - id: prettier
name: prettier name: prettier
entry: pnpm exec prettier --cache --ignore-unknown --write entry: corepack pnpm exec prettier --cache --ignore-unknown --write
language: system language: system
exclude_types: [json] exclude_types: [json]
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"
hooks:
- id: editorconfig-checker
alias: ec
args: [-disable-max-line-length]
- repo: local
hooks:
- id: latexmk - id: latexmk
name: latexmk name: latexmk
entry: latexmk -quiet -f entry: latexmk -quiet -f
@ -93,12 +90,16 @@ repos:
types: [text, tex] types: [text, tex]
# I have no idea where latexmk wants the template # I have no idea where latexmk wants the template
exclude: LaTeX\/standardi-asiakirja.tex exclude: LaTeX\/standardi-asiakirja.tex
# Fedora: perl-Image-ExifTool
# Fedora: perl-Image-ExifTool
- repo: local
hooks:
- id: exiftool - id: exiftool
name: Remove all EXIF metadata using exiftool name: Remove all EXIF metadata using exiftool
entry: exiftool -all= entry: exiftool -all=
language: system language: system
types: [image] types: [image]
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"
hooks:
- id: editorconfig-checker
alias: ec
args: [-disable-max-line-length]

View File

@ -4,5 +4,6 @@
"prettier": "3.3.2", "prettier": "3.3.2",
"prettier-plugin-sh": "0.14.0", "prettier-plugin-sh": "0.14.0",
"prettier-plugin-toml": "2.0.1" "prettier-plugin-toml": "2.0.1"
} },
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a"
} }