Fix: prettier pre-commit configuration 19/67819/4
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 26 May 2021 19:27:51 +0000 (21:27 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 26 May 2021 21:27:45 +0000 (23:27 +0200)
commitdac1f24f85f7c9b12e87ca495fbcb637f0d6653c
treeaccdd0ea3e85cd7908283ab9e8073c083e0f8959
parent5d3af28d6f7123475c53d8249508f81a39e838fa
Fix: prettier pre-commit configuration

According to https://github.com/prettier/pre-commit the prettier repo to
use in the pre-commit configuration file shifted to the new URL
https://github.com/pre-commit/mirrors-prettier

Also running this hook locally outside of the tox profile resulted in the
following error:

$ git commit --amend
[..]

gitlint...........................................................Passed
prettier..........................................................Failed
- hook id: prettier
- exit code: 2

[error] No matching files. Patterns: .git/COMMIT_EDITMSG

According to https://github.com/pre-commit/mirrors-prettier/issues/5
the reason behind is that prettier can not perform at the [commit-msg]
stage and only at the [commit] stage.
Forcing the stage parameter to [commit] in the hook configuration
managed to fix the issue.

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I1991d5dbab8c6d4ad83e3466fdd4a7bc3cfc865a
.pre-commit-config.yaml