安装 pre-commit
sudo apt install pre-commit -y
repos:
- repo: https://github.com/python/black
rev: 23.3.0
hooks:
- id: black
language_version: python3
exclude: src/ratel/pot
args: ["--line-length", "180"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.0
hooks:
- id: prettier
files: ^mark_data/
types: [ json ]
args: [ "--print-width", "12" ]