Files
netbox/.pre-commit-config.yaml
Jeremy Stretch 29239ca58a Closes #21635: Migrate from mkdocs to Zensical (#21742)
* Drop mkdocs from `requirements.txt` and add Zensical
* Replace mkdocs with Zensical in CI and pre-commit tasks
* Remove `.info` from the `docs/` build directory (obsolete)
* Update the legacy ReadTheDocs configuration
* Update upgrade script to use Zensical
* Remove custom docs footer
* Remove obsolete CSS
2026-03-25 16:48:29 +01:00

45 lines
1.4 KiB
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.2
hooks:
- id: ruff
name: "Ruff linter"
args: [ netbox/ ]
- repo: local
hooks:
- id: django-check
name: "Django system check"
description: "Run Django's internal check for common problems"
entry: python netbox/manage.py check
language: system
pass_filenames: false
types: [python]
- id: django-makemigrations
name: "Django migrations check"
description: "Check for any missing Django migrations"
entry: python netbox/manage.py makemigrations --check
language: system
pass_filenames: false
types: [python]
- id: zensical-build
name: "Build documentation"
description: "Build the documentation with Zensical"
files: 'docs/'
entry: zensical build
language: system
pass_filenames: false
- id: yarn-validate
name: "Yarn validate"
description: "Check UI ESLint, TypeScript, and Prettier compliance"
files: 'netbox/project-static/'
entry: yarn --cwd netbox/project-static validate
language: system
pass_filenames: false
- id: verify-bundles
name: "Verify static asset bundles"
description: "Ensure that any modified static assets have been compiled"
files: 'netbox/project-static/'
entry: scripts/verify-bundles.sh
language: system
pass_filenames: false