add pre-commit hooks

This commit is contained in:
mertalev 2023-11-20 00:20:00 -05:00
parent ddf04a7eb4
commit a03cc73789
No known key found for this signature in database
GPG key ID: 9181CD92C0A1C5E3
2 changed files with 32 additions and 1 deletions

28
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [ --fix=lf ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: [ ./machine-learning, --fix ]
- id: ruff-format
args: [ ./machine-learning ]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
args: [ ./server, --write ]
- id: prettier
args: [ ./web, --write ]
- repo: https://github.com/python-poetry/poetry
rev: "1.7.1"
hooks:
- id: poetry-lock
args: [ -C, ./machine-learning ]

View file

@ -38,5 +38,8 @@
"vector_map_tiles",
"flutter_map",
"flutter_map_heatmap"
]
],
"pre-commit": {
"enabled": true
}
}