mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-09-19 08:11:52 +08:00
ad86519c6b
* build: replace the npm lint stack with pre-commit markdownlint-cli2, prettier and eslint for YAML/JSON, husky and lint-staged are gone. pre-commit runs ruff, rumdl (the same five markdown rules), yamllint, yamlfix, the JSON checks, both validators and pytest, at commit time and over the whole tree from tools/quality.py, which is now what `npm run quality` calls. ESLint and prettier stay only for the docs-site scripts and tests. quality.yaml collapses to a Python job and a docs-site job. yamlfix keeps one blank line and no document-start marker: its defaults strip blank lines inside block scalars and add `---`, which the sprint status scripts do not write back. The JSON hook keeps key order and non-ASCII text. * style: apply yamlfix and JSON formatting to the tree Mechanical output of the new hooks; every file parses to the same data. * docs: state what the commit hook covers
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
# Runs at commit time (uv run pre-commit install) and over the whole tree
|
|
# from tools/quality.py. Revisions are bumped with `uv run pre-commit autoupdate`.
|
|
exclude: ^(docs-site/|.*/tests/fixtures/)
|
|
|
|
repos:
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.16.6
|
|
hooks:
|
|
- id: ruff-check
|
|
args: [--fix]
|
|
- id: ruff-format
|
|
- repo: https://github.com/rvben/rumdl-pre-commit
|
|
rev: v0.2.66
|
|
hooks:
|
|
- id: rumdl
|
|
files: \.md$
|
|
exclude: ^(tools/tests/fixtures/|CODE_OF_CONDUCT\.md$)
|
|
- repo: https://github.com/adrienverge/yamllint
|
|
rev: v1.38.0
|
|
hooks:
|
|
- id: yamllint
|
|
- repo: https://github.com/lyz-code/yamlfix
|
|
rev: 1.19.1
|
|
hooks:
|
|
- id: yamlfix
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: check-json
|
|
- id: pretty-format-json
|
|
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
|
|
- repo: local
|
|
hooks:
|
|
- id: validate-file-refs
|
|
name: validate file references
|
|
entry: uv run tools/validate_file_refs.py --strict
|
|
language: system
|
|
pass_filenames: false
|
|
always_run: true
|
|
- id: validate-skills
|
|
name: validate skills
|
|
entry: uv run tools/validate_skills.py --strict
|
|
language: system
|
|
pass_filenames: false
|
|
always_run: true
|
|
- id: pytest
|
|
name: pytest
|
|
entry: env PYTHONDONTWRITEBYTECODE=1 uv run --frozen pytest
|
|
language: system
|
|
pass_filenames: false
|
|
always_run: true
|