|
| 1 | +--- |
| 2 | +# See https://pre-commit.com for more information |
| 3 | +# See https://pre-commit.com/hooks.html for more hooks |
| 4 | + |
| 5 | +# Don't run pre-commit on files under any thirdparty/, third_party/, third-party/, etc. sub-folders |
| 6 | +# But will run on directories like third/.../../party/, etc. |
| 7 | +exclude: (?i)^(.*third[^/]*party/.*|.*\.trt)$ |
| 8 | + |
| 9 | +repos: |
| 10 | + - repo: https://github.com/sirosen/check-jsonschema # check-jsonschema is a github actions and workflows verifier. |
| 11 | + rev: 0.37.1 |
| 12 | + hooks: |
| 13 | + - id: check-github-actions |
| 14 | + - id: check-github-workflows |
| 15 | + |
| 16 | + - repo: https://github.com/pre-commit/mirrors-prettier |
| 17 | + rev: v4.0.0-alpha.8 |
| 18 | + hooks: |
| 19 | + - id: prettier |
| 20 | + types_or: [css, scss, json, javascript, html] |
| 21 | + exclude: (?i)(.*main.*scss)$ |
| 22 | + |
| 23 | + - repo: https://github.com/google/yamlfmt |
| 24 | + rev: v0.21.0 |
| 25 | + hooks: |
| 26 | + - id: yamlfmt |
| 27 | + exclude: (?i)(.pre-commit-config.yaml)$ |
| 28 | + |
| 29 | + - repo: https://github.com/jonasbb/pre-commit-latex-hooks |
| 30 | + rev: v1.5.0 |
| 31 | + hooks: |
| 32 | + - id: american-eg-ie |
| 33 | + - id: cleveref-capitalization |
| 34 | + - id: consistent-spelling |
| 35 | + args: |
| 36 | + [ |
| 37 | + "--emph=et al.", |
| 38 | + "--emph=a priori", |
| 39 | + "--emph=a posteriori", |
| 40 | + '--regex=naive=\bna(i|\\"i)ve', |
| 41 | + ] |
| 42 | + - id: csquotes |
| 43 | + - id: ensure-labels-for-sections |
| 44 | + args: |
| 45 | + [ |
| 46 | + # If present only check that there is a \label{} but not the value |
| 47 | + "--ignore-label-content", |
| 48 | + ] |
| 49 | + - id: no-space-in-cite |
| 50 | + - id: tilde-cite |
| 51 | + - id: unique-labels |
| 52 | + # args: |
| 53 | + # [ |
| 54 | + # # If present only check for uniqueness within each file. |
| 55 | + # # Can be useful if a repository contains multiple main files. |
| 56 | + # "--individual", |
| 57 | + # ] |
| 58 | + - id: cleveref-instead-of-autoref |
| 59 | + |
| 60 | + - repo: https://github.com/cmhughes/latexindent.pl.git |
| 61 | + rev: V4.0 |
| 62 | + hooks: |
| 63 | + - id: latexindent |
| 64 | + |
| 65 | + - repo: https://github.com/executablebooks/mdformat # mdformat is a markdown formatter. |
| 66 | + rev: 1.0.0 |
| 67 | + hooks: |
| 68 | + - id: mdformat |
| 69 | + |
| 70 | + - repo: https://github.com/pre-commit/pre-commit-hooks # pre-commit-hooks is a collection of additional pre-commit hooks. |
| 71 | + rev: v6.0.0 |
| 72 | + hooks: |
| 73 | + # - id: requirements-txt-fixer # fixes requirements.txt and requirements-dev.txt. |
| 74 | + # - id: check-added-large-files # prevents giant files from being committed. |
| 75 | + - id: check-case-conflict # checks for files that would conflict in case-insensitive filesystem. |
| 76 | + - id: check-merge-conflict # checks for files that contain merge conflict strings. |
| 77 | + - id: check-yaml # checks yaml files for parseable syntax. |
| 78 | + args: |
| 79 | + - --allow-multiple-documents |
| 80 | + - --unsafe |
| 81 | + # - id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang. |
| 82 | + # - id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable. |
| 83 | + - id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline. |
| 84 | + - id: fix-byte-order-marker # removes utf-8 byte order marker. |
| 85 | + - id: mixed-line-ending # replaces or checks mixed line ending. |
| 86 | + - id: trailing-whitespace # trims trailing whitespace. |
0 commit comments