tubearchivist/.pre-commit-config.yaml

50 lines
1.3 KiB
YAML
Raw Normal View History

2025-01-06 21:08:51 +07:00
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- repo: https://github.com/psf/black
2025-03-08 17:40:32 +07:00
rev: 25.1.0
2025-01-06 21:08:51 +07:00
hooks:
- id: black
alias: python
files: ^backend/
args: ["--line-length=79"]
- repo: https://github.com/pycqa/isort
2025-03-08 17:40:32 +07:00
rev: 6.0.1
2025-01-06 21:08:51 +07:00
hooks:
- id: isort
name: isort (python)
alias: python
files: ^backend/
args: ["--profile", "black", "-l 79"]
- repo: https://github.com/pycqa/flake8
2025-03-08 17:40:32 +07:00
rev: 7.1.2
2025-01-06 21:08:51 +07:00
hooks:
- id: flake8
alias: python
files: ^backend/
2025-01-06 19:04:41 +01:00
args: ["--max-complexity=10", "--max-line-length=79"]
2025-01-06 21:08:51 +07:00
- repo: https://github.com/codespell-project/codespell
2025-03-08 17:40:32 +07:00
rev: v2.4.1
2025-01-06 21:08:51 +07:00
hooks:
- id: codespell
exclude: ^frontend/package-lock.json
2025-01-06 19:04:41 +01:00
- repo: https://github.com/pre-commit/mirrors-eslint
2025-03-08 17:40:32 +07:00
rev: v9.22.0
2025-01-06 19:04:41 +01:00
hooks:
- id: eslint
name: eslint
2025-01-07 10:02:48 +07:00
files: \.[jt]sx?$
types: [file]
2025-01-06 19:04:41 +01:00
entry: npm run --prefix ./frontend lint
pass_filenames: false
2025-01-06 21:08:51 +07:00
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
2025-01-06 19:04:41 +01:00
entry: npm run --prefix ./frontend format
2025-01-06 21:08:51 +07:00
pass_filenames: false
exclude: '.*(\.svg|/migrations/).*'