mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 13:55:41 +01:00
- ci: comment out pre-commit.ci skip directives - Django check hooks already disabled in hook definitions - Removes redundant CI-level skip configuration
125 lines
3.2 KiB
YAML
125 lines
3.2 KiB
YAML
# default_install_hook_types:
|
|
# - pre-commit
|
|
# - post-checkout
|
|
# - post-merge
|
|
# - post-rewrite
|
|
|
|
# ci:
|
|
# skip: [django-check, django-check-migrations]
|
|
|
|
default_language_version:
|
|
node: 22.15.1
|
|
python: python3.13
|
|
|
|
repos:
|
|
- repo: https://github.com/adamchainz/django-upgrade
|
|
rev: 1.29.1
|
|
hooks:
|
|
- id: django-upgrade
|
|
|
|
# uv hooks for dependency management
|
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
rev: 0.9.7
|
|
hooks:
|
|
# Update the uv lockfile
|
|
- id: uv-lock
|
|
# Update the requirements.txt
|
|
- id: uv-export
|
|
|
|
# Standard pre-commit hooks
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
args: [--markdown-linebreak-ext=md]
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
# - id: check-json
|
|
- id: check-toml
|
|
- id: check-added-large-files
|
|
args: [--maxkb=1000]
|
|
- id: detect-private-key
|
|
- id: check-merge-conflict
|
|
- id: check-case-conflict
|
|
- id: debug-statements
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: prettier-jinja
|
|
name: Prettier Jinja
|
|
language: node
|
|
additional_dependencies:
|
|
- prettier
|
|
- prettier-plugin-jinja-template
|
|
types_or: [html, jinja]
|
|
entry: bunx prettier --plugin=prettier-plugin-jinja-template --parser=jinja-template --write
|
|
- id: prettier-all
|
|
name: Prettier All
|
|
language: node
|
|
types_or: [javascript, jsx, ts, tsx, css, scss, json, yaml, markdown]
|
|
entry: bunx prettier --write
|
|
|
|
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
rev: v0.18.1
|
|
hooks:
|
|
- id: markdownlint-cli2
|
|
args: [--fix]
|
|
|
|
# Ruff for linting and formatting
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.14.3
|
|
hooks:
|
|
# Run the linter.
|
|
- id: ruff-check
|
|
args: [--fix]
|
|
# Run the formatter.
|
|
- id: ruff-format
|
|
|
|
# # Django-specific hooks
|
|
# - repo: local
|
|
# hooks:
|
|
# - id: django-check
|
|
# name: Django Check
|
|
# entry: uv run python dashboard_project/manage.py check
|
|
# language: python
|
|
# pass_filenames: false
|
|
# types: [python]
|
|
# always_run: true
|
|
# additional_dependencies: [uv]
|
|
|
|
# - id: django-check-migrations
|
|
# name: Django Check Migrations
|
|
# entry: uv run python dashboard_project/manage.py makemigrations --check --dry-run
|
|
# language: python
|
|
# pass_filenames: false
|
|
# types: [python]
|
|
# additional_dependencies: [uv]
|
|
|
|
# Security checks
|
|
- repo: https://github.com/pycqa/bandit
|
|
rev: 1.8.6
|
|
hooks:
|
|
- id: bandit
|
|
args: [-c, pyproject.toml, -r, dashboard_project]
|
|
# additional_dependencies: ["bandit[toml]"]
|
|
|
|
# TOML formatting and linting
|
|
- repo: https://github.com/tombi-toml/tombi-pre-commit
|
|
rev: v0.6.40
|
|
hooks:
|
|
- id: tombi-format
|
|
- id: tombi-lint
|
|
|
|
# # Type checking
|
|
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
# rev: v1.15.0
|
|
# hooks:
|
|
# - id: mypy
|
|
# additional_dependencies:
|
|
# - django-stubs>=5.0.2
|
|
# - types-python-dateutil
|
|
# - types-requests
|
|
# - types-PyYAML
|