Update prettier pre-commit to ignore stage error
[releng/global-jjb.git] / .pre-commit-config.yaml
1 ---
2 repos:
3   - repo: https://github.com/pre-commit/pre-commit-hooks
4     rev: v3.1.0
5     hooks:
6       - id: trailing-whitespace
7
8   - repo: https://github.com/prettier/pre-commit
9     rev: v2.1.2
10     hooks:
11       - id: prettier
12         stages: [commit]
13
14   - repo: https://github.com/jorisroovers/gitlint
15     rev: v0.13.1
16     hooks:
17       - id: gitlint
18
19   - repo: https://github.com/jumanjihouse/pre-commit-hooks
20     rev: 2.1.5
21     hooks:
22       - id: shellcheck
23
24   - repo: https://github.com/btford/write-good
25     rev: v1.0.4
26     hooks:
27       - id: write-good
28         exclude: >
29           (?x)^(
30             docs/jjb/lf-c-cpp-jobs.rst|
31             docs/jjb/lf-ci-jobs.rst|
32             docs/jjb/lf-macros.rst|
33             docs/jjb/lf-python-jobs.rst
34           )$
35
36   - repo: https://github.com/btford/write-good
37     rev: v1.0.4
38     hooks:
39       # Files listed below break the following write-good rules:
40       #   - adverb weakens meaning
41       #   - is wordy or unneeded
42       #
43       # This allows us to place an exception need to pass the check without disabling all checks for
44       # the whole file.
45       # In an ideal world write-good would give us an override for each individual instance of a
46       # violation but until then this gives us a close enough approach.
47       - id: write-good
48         name: "write-good --no-adverb --no-tooWordy"
49         args: ["--no-adverb", "--no-tooWordy"]
50         files: docs/jjb/lf-ci-jobs.rst
51
52   - repo: https://github.com/btford/write-good
53     rev: v1.0.4
54     hooks:
55       # Files listed below break the following write-good rules:
56       #   - is wordy or unneeded
57       #
58       # This allows us to place an exception need to pass the check without disabling all checks for
59       # the whole file.
60       # In an ideal world write-good would give us an override for each individual instance of a
61       # violation but until then this gives us a close enough approach.
62       - id: write-good
63         name: "write-good --no-tooWordy"
64         args: ["--no-tooWordy"]
65         files: >
66           (?x)^(
67             docs/jjb/lf-c-cpp-jobs.rst|
68             docs/jjb/lf-macros.rst|
69             docs/jjb/lf-python-jobs.rst
70           )$