0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00
wagtail/.pre-commit-config.yaml
Dan Braghis 6dae6e5d07 Add and configure black
This:
- updates the pre-commit configuration and setup.py testing dependencies
- updates isort/flake8 configuration for black
- adds black linting to Makefile and CircleCI configuration
- updates editorconfig with the new line length (88) for py files
- updates python guidelines in docs
2022-02-15 13:06:17 +00:00

51 lines
1.4 KiB
YAML

default_language_version:
node: system
repos:
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
language_version: python3
args: ['--target-version', 'py37']
- repo: https://github.com/timothycrosley/isort
# isort config is in setup.cfg
rev: 5.6.4
hooks:
- id: isort
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
# flake8 config is in setup.cfg
rev: 3.8.4
hooks:
- id: flake8
language_version: python3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
types_or: [css, scss, javascript, ts, tsx, json, yaml]
- 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:
- eslint@8.8.0
- '@typescript-eslint/eslint-plugin@5.10.1'
- '@typescript-eslint/parser@5.10.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:
- stylelint@14.2.0
- '@wagtail/stylelint-config-wagtail@0.3.2'
- repo: https://github.com/rtts/djhtml
rev: v1.4.13
hooks:
- id: djhtml