Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / .pre-commit-config.yaml
index 984ea24..b10d63f 100644 (file)
@@ -1,35 +1,39 @@
 ---
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v3.1.0
+    rev: v4.5.0
     hooks:
       - id: trailing-whitespace
+      - id: no-commit-to-branch
+        args:
+          - --branch=master
+          - --branch=main
 
-  - repo: https://github.com/prettier/prettier
-    rev: 2.0.5
+  - repo: https://github.com/pre-commit/mirrors-prettier
+    rev: v4.0.0-alpha.8
     hooks:
       - id: prettier
+        stages: [commit]
 
   - repo: https://github.com/jorisroovers/gitlint
-    rev: v0.13.1
+    rev: v0.19.1
     hooks:
       - id: gitlint
 
+  - repo: https://github.com/adrienverge/yamllint.git
+    rev: v1.35.1
+    hooks:
+      - id: yamllint
+
   - repo: https://github.com/jumanjihouse/pre-commit-hooks
-    rev: 2.1.1
+    rev: 3.0.0
     hooks:
       - id: shellcheck
 
-  - repo: local
+  - repo: https://github.com/btford/write-good
+    rev: v1.0.8
     hooks:
-      # TODO: Switch to upstream hook when https://github.com/btford/write-good/pull/119 is merged.
       - id: write-good
-        name: write-good
-        description: Check docs for English prose with write-good
-        entry: write-good
-        language: node
-        files: "\\.(rst|md|markdown|mdown|mkdn)$"
-        additional_dependencies: ["write-good"]
         exclude: >
           (?x)^(
             docs/jjb/lf-c-cpp-jobs.rst|
@@ -38,40 +42,38 @@ repos:
             docs/jjb/lf-python-jobs.rst
           )$
 
-      # TODO: Switch to upstream hook when https://github.com/btford/write-good/pull/119 is merged.
+  - repo: https://github.com/btford/write-good
+    rev: v1.0.8
+    hooks:
       # Files listed below break the following write-good rules:
       #   - adverb weakens meaning
       #   - is wordy or unneeded
       #
-      # This allows us to place an exception need to pass the check without disabling all checks for
-      # the whole file.
-      # In an ideal world write-good would give us an override for each individual instance of a
-      # violation but until then this gives us a close enough approach.
+      # This allows us to place an exception needed to pass the check without
+      # disabling all checks for the whole file. In an ideal world write-good
+      # would give us an override for each individual instance of a violation
+      # but until then this gives us a close enough approach.
       - id: write-good
-        name: write-good --no-adverb --no-tooWordy
-        description: Check docs for English prose with write-good
-        entry: write-good --no-adverb --no-tooWordy
-        language: node
+        name: "write-good --no-adverb --no-tooWordy"
+        args: ["--no-adverb", "--no-tooWordy"]
         files: docs/jjb/lf-ci-jobs.rst
-        additional_dependencies: ["write-good"]
 
-      # TODO: Switch to upstream hook when https://github.com/btford/write-good/pull/119 is merged.
+  - repo: https://github.com/btford/write-good
+    rev: v1.0.8
+    hooks:
       # Files listed below break the following write-good rules:
       #   - is wordy or unneeded
       #
-      # This allows us to place an exception need to pass the check without disabling all checks for
-      # the whole file.
-      # In an ideal world write-good would give us an override for each individual instance of a
-      # violation but until then this gives us a close enough approach.
+      # This allows us to place an exception needed to pass the check without
+      # disabling all checks for the whole file. In an ideal world write-good
+      # would give us an override for each individual instance of a violation
+      # but until then this gives us a close enough approach.
       - id: write-good
-        name: write-good --no-tooWordy
-        description: Check docs for English prose with write-good
-        entry: write-good --no-tooWordy
-        language: node
+        name: "write-good --no-tooWordy"
+        args: ["--no-tooWordy"]
         files: >
           (?x)^(
             docs/jjb/lf-c-cpp-jobs.rst|
             docs/jjb/lf-macros.rst|
             docs/jjb/lf-python-jobs.rst
           )$
-        additional_dependencies: ["write-good"]