2022-04-01 21:48:40 +08:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-06-14 06:53:00 +08:00
|
|
|
rev: v4.3.0
|
2022-04-01 21:48:40 +08:00
|
|
|
hooks:
|
|
|
|
- id: forbid-new-submodules
|
2022-04-02 00:02:12 +08:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
- id: requirements-txt-fixer
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-toml
|
|
|
|
- id: check-yaml
|
|
|
|
- id: debug-statements
|
|
|
|
- id: check-builtin-literals
|
|
|
|
- id: trailing-whitespace
|
|
|
|
exclude: .bumpversion.cfg
|
2022-04-01 21:48:40 +08:00
|
|
|
|
2022-04-02 00:02:12 +08:00
|
|
|
- repo: https://github.com/psf/black
|
2022-10-11 08:58:22 +08:00
|
|
|
rev: 22.10.0
|
2022-04-02 00:02:12 +08:00
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
args: ["--line-length", "100"]
|
2022-04-01 21:48:40 +08:00
|
|
|
|
2022-04-02 00:02:12 +08:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
|
|
rev: 5.10.1
|
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
files: \.py$
|
|
|
|
args: [--profile=black]
|
2022-04-01 21:48:40 +08:00
|
|
|
|
2022-04-09 18:46:04 +08:00
|
|
|
- repo: https://github.com/PyCQA/doc8
|
2022-08-04 14:03:30 +08:00
|
|
|
rev: v1.0.0
|
2022-04-09 18:46:04 +08:00
|
|
|
hooks:
|
|
|
|
- id: doc8
|
|
|
|
args: [--max-line-length=200]
|
|
|
|
stages: [manual]
|
|
|
|
|
2022-10-17 08:28:25 +08:00
|
|
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
|
|
rev: v0.10.1
|
|
|
|
hooks:
|
|
|
|
- id: validate-pyproject
|
|
|
|
stages: [manual]
|
|
|
|
|
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
|
|
|
rev: 0.7.16
|
2022-04-02 00:34:37 +08:00
|
|
|
hooks:
|
2022-10-17 08:28:25 +08:00
|
|
|
- id: mdformat
|
|
|
|
|
|
|
|
- repo: https://github.com/john-hen/Flake8-pyproject
|
2022-10-18 08:11:41 +08:00
|
|
|
rev: 1.1.0.post0
|
2022-10-17 08:28:25 +08:00
|
|
|
hooks:
|
|
|
|
- id: Flake8-pyproject
|
|
|
|
alias: flake8
|
2022-04-02 00:34:37 +08:00
|
|
|
additional_dependencies:
|
2022-10-17 08:28:25 +08:00
|
|
|
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
|
2022-04-09 18:46:04 +08:00
|
|
|
stages: [manual]
|
2022-04-01 21:48:40 +08:00
|
|
|
|
|
|
|
- repo: https://github.com/sirosen/check-jsonschema
|
2022-11-15 08:36:16 +08:00
|
|
|
rev: 0.19.1
|
2022-04-01 21:48:40 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-jsonschema
|
|
|
|
name: 'Check GitHub Workflows'
|
|
|
|
files: ^\.github/workflows/
|
|
|
|
types: [yaml]
|
|
|
|
args: ['--schemafile', 'https://json.schemastore.org/github-workflow']
|
2022-04-09 18:46:04 +08:00
|
|
|
stages: [manual]
|
2022-04-01 21:48:40 +08:00
|
|
|
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: prettier
|
|
|
|
name: prettier
|
|
|
|
entry: 'npm run prettier:files'
|
|
|
|
language: node
|
2022-10-17 08:28:25 +08:00
|
|
|
types_or: [json, ts, tsx, javascript, jsx, css]
|
|
|
|
stages: [manual]
|
2022-04-01 21:48:40 +08:00
|
|
|
- id: integrity
|
|
|
|
name: integrity
|
|
|
|
entry: 'npm run integrity --force'
|
|
|
|
language: node
|
|
|
|
stages: [push]
|