0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/.pre-commit-config.yaml
Storm B. Heg 1dba117c2a Update pre-commit hooks
Some linters and formatters were updated in 35dfdea, but that did not
include the versions used by pre-commit.
2023-08-05 10:04:07 +10:00

62 lines
1.7 KiB
YAML

default_language_version:
node: system
python: python3
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
args: ['--target-version', 'py38']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.272'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
hooks:
- id: prettier
types_or: [css, scss, javascript, ts, tsx, json, yaml]
additional_dependencies:
# Keep in sync with package.json
- prettier@3.0.1
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.8.0
hooks:
- id: eslint
types: [file]
files: \.(js|ts|tsx)$
args: [--report-unused-disable-directives]
additional_dependencies:
# Keep in sync with package.json
- eslint@8.46
- '@typescript-eslint/eslint-plugin@6.2.1'
- '@typescript-eslint/parser@6.2.1'
- '@wagtail/eslint-config-wagtail@0.4.0'
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
rev: v14.2.0
hooks:
- id: stylelint
files: \.scss$
additional_dependencies:
# Keep in sync with package.json
- stylelint@14.2.0
- '@wagtail/stylelint-config-wagtail@0.5.0'
- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1
hooks:
- id: curlylint
args: ['--parse-only']
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
hooks:
- id: djhtml
- repo: https://github.com/returntocorp/semgrep
rev: v1.3.0
hooks:
- id: semgrep
args: ['--config', '.semgrep.yml', '--error']