2022-02-27 09:33:59 -08:00
|
|
|
# This file configures pre-commit hooks.
|
|
|
|
|
# See https://pre-commit.com/ for general information
|
|
|
|
|
# See https://pre-commit.com/hooks.html for a listing of possible hooks
|
|
|
|
|
repos:
|
2022-03-03 09:35:00 -08:00
|
|
|
# General hooks
|
2022-02-27 09:33:59 -08:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2025-09-17 13:16:34 -07:00
|
|
|
rev: v6.0.0
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: check-docstring-first
|
|
|
|
|
- id: check-json
|
|
|
|
|
exclude: "tsconfig.*json"
|
|
|
|
|
- id: check-yaml
|
2024-01-03 00:19:19 -08:00
|
|
|
args:
|
|
|
|
|
- "--unsafe"
|
2022-02-27 09:33:59 -08:00
|
|
|
- id: check-toml
|
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
exclude_types:
|
|
|
|
|
- svg
|
|
|
|
|
- pofile
|
2025-09-03 21:58:53 +00:00
|
|
|
exclude: "(^LICENSE$|^src/documents/static/bootstrap.min.css$)"
|
2022-02-27 09:33:59 -08:00
|
|
|
- id: mixed-line-ending
|
|
|
|
|
args:
|
|
|
|
|
- "--fix=lf"
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
exclude_types:
|
|
|
|
|
- svg
|
|
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: detect-private-key
|
2024-01-08 13:03:05 -08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2025-07-07 17:37:58 -07:00
|
|
|
rev: v2.4.1
|
2024-01-08 13:03:05 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: codespell
|
2025-08-17 10:45:51 -07:00
|
|
|
additional_dependencies: [tomli]
|
2024-01-08 13:03:05 -08:00
|
|
|
exclude_types:
|
|
|
|
|
- pofile
|
|
|
|
|
- json
|
2024-09-08 13:03:38 -07:00
|
|
|
# See https://github.com/prettier/prettier/issues/15742 for the fork reason
|
|
|
|
|
- repo: https://github.com/rbubley/mirrors-prettier
|
2025-07-07 17:37:58 -07:00
|
|
|
rev: 'v3.6.2'
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: prettier
|
|
|
|
|
types_or:
|
|
|
|
|
- javascript
|
|
|
|
|
- ts
|
|
|
|
|
- markdown
|
2024-12-13 00:27:30 -08:00
|
|
|
additional_dependencies:
|
|
|
|
|
- prettier@3.3.3
|
|
|
|
|
- 'prettier-plugin-organize-imports@4.1.0'
|
2022-03-03 09:35:00 -08:00
|
|
|
# Python hooks
|
2023-09-08 08:53:07 -07:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2025-10-15 13:07:30 -07:00
|
|
|
rev: v0.14.0
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
2025-09-03 21:58:53 +00:00
|
|
|
- id: ruff-check
|
2024-05-17 19:26:50 -07:00
|
|
|
- id: ruff-format
|
2025-03-04 08:15:51 -08:00
|
|
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
2025-10-15 13:07:30 -07:00
|
|
|
rev: "v2.11.0"
|
2025-03-04 08:15:51 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: pyproject-fmt
|
2022-03-03 09:35:00 -08:00
|
|
|
# Dockerfile hooks
|
2022-04-18 08:18:20 -07:00
|
|
|
- repo: https://github.com/AleksaC/hadolint-py
|
2025-09-30 08:51:06 -07:00
|
|
|
rev: v2.14.0
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
2022-04-18 08:18:20 -07:00
|
|
|
- id: hadolint
|
2022-03-03 09:35:00 -08:00
|
|
|
# Shell script hooks
|
|
|
|
|
- repo: https://github.com/lovesegfault/beautysh
|
|
|
|
|
rev: v6.2.1
|
|
|
|
|
hooks:
|
|
|
|
|
- id: beautysh
|
2024-09-26 12:22:24 -07:00
|
|
|
additional_dependencies:
|
|
|
|
|
- setuptools
|
2022-03-07 13:53:35 -08:00
|
|
|
args:
|
|
|
|
|
- "--tab"
|
2022-02-27 09:33:59 -08:00
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
2025-09-17 13:16:34 -07:00
|
|
|
rev: "v0.11.0.1"
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: shellcheck
|
2025-04-22 15:20:54 -07:00
|
|
|
- repo: https://github.com/google/yamlfmt
|
2025-10-15 13:07:30 -07:00
|
|
|
rev: v0.18.0
|
2025-04-22 15:20:54 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: yamlfmt
|
|
|
|
|
exclude: "^src-ui/pnpm-lock.yaml"
|
2025-10-15 13:07:30 -07:00
|
|
|
types:
|
|
|
|
|
- yaml
|