|
| 1 | +# Pre-commit hooks for technick.ai |
| 2 | +# Install: pre-commit install |
| 3 | +# Run manually: pre-commit run --all-files |
| 4 | + |
| 5 | +exclude: '\.git/|__pycache__/|\.pyc' |
| 6 | + |
| 7 | +repos: |
| 8 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 9 | + rev: v6.0.0 |
| 10 | + hooks: |
| 11 | + - id: check-added-large-files |
| 12 | + name: Block large files |
| 13 | + args: [--maxkb=500] |
| 14 | + - id: check-ast |
| 15 | + name: Validate Python syntax |
| 16 | + - id: check-merge-conflict |
| 17 | + name: Detect merge conflicts |
| 18 | + - id: check-symlinks |
| 19 | + name: Validate symlinks |
| 20 | + - id: check-yaml |
| 21 | + name: Validate YAML syntax |
| 22 | + args: [--allow-multiple-documents] |
| 23 | + - id: trailing-whitespace |
| 24 | + name: Trim whitespace |
| 25 | + |
| 26 | + - repo: https://github.com/Lucas-C/pre-commit-hooks |
| 27 | + rev: v1.5.5 |
| 28 | + hooks: |
| 29 | + - id: remove-tabs |
| 30 | + name: Replace tabs with spaces |
| 31 | + |
| 32 | + - repo: https://github.com/sirosen/texthooks |
| 33 | + rev: 0.7.1 |
| 34 | + hooks: |
| 35 | + - id: fix-smartquotes |
| 36 | + name: Fix smart quotes |
| 37 | + - id: forbid-bidi-controls |
| 38 | + name: Forbid bidirectional text (security) |
| 39 | + |
| 40 | + # Ruff replaces flake8, pylint, isort and more |
| 41 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 42 | + rev: v0.14.5 |
| 43 | + hooks: |
| 44 | + - id: ruff |
| 45 | + name: Fix Python issues (Ruff) |
| 46 | + args: [--fix] |
| 47 | + - id: ruff-format |
| 48 | + name: Format Python (Ruff) |
| 49 | + |
| 50 | + # Prettier for HTML, CSS, JS, JSON, YAML |
| 51 | + - repo: https://github.com/rbubley/mirrors-prettier |
| 52 | + rev: v3.6.2 |
| 53 | + hooks: |
| 54 | + - id: prettier |
| 55 | + name: Format with Prettier |
| 56 | + types_or: ["html", "css", "javascript", "json", "yaml"] |
| 57 | + exclude: | |
| 58 | + (?x)^( |
| 59 | + .*\.min\.(js|css) |
| 60 | + )$ |
| 61 | +
|
| 62 | + - repo: https://github.com/rhysd/actionlint |
| 63 | + rev: v1.7.8 |
| 64 | + hooks: |
| 65 | + - id: actionlint |
| 66 | + name: Check GitHub Actions |
0 commit comments