-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
58 lines (54 loc) · 2.12 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# SPDX-FileCopyrightText: Copyright 2020-2025, Contributors to Tyrannosaurus
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/tyrannosaurus
# SPDX-License-Identifier: Apache-2.0
# Check out https://pre-commit.com/ for documentation
minimum_pre_commit_version: 4.0.1
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: forbid-submodules # ban Git submodules
- id: check-case-conflict # ban ABC and abc both existing
- id: check-illegal-windows-names # ban filenames that are illegal on Windows
- id: check-merge-conflict # ban merge conflict markers
args:
- --assume-in-merge # otherwise skipped in rebase
- id: check-symlinks # ban *broken* symlinks
- id: end-of-file-fixer # auto-add final \n
- id: fix-byte-order-marker # auto-remove BOMs
- id: trailing-whitespace # auto-remove end-of-line whitespace
# UV lock
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.18
hooks:
- id: uv-lock
# Format and lint Python with Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args:
- --fix-only
- id: ruff-format
# Format various formats with Prettier
- repo: https://github.com/JoC0de/pre-commit-prettier
rev: v3.4.2
hooks:
- id: prettier
additional_dependencies:
args:
- --experimental-ternaries # will be the default soon
- --plugin=prettier-plugin-ini
- --plugin=prettier-plugin-properties
- --plugin=prettier-plugin-toml
- --plugin=prettier-plugin-sh
# IMPORTANT: Sync this list with file types in this repo.
# It's ok to list unused suffixes, but Prettier or a plugin must understand them.
# See: https://prettier.io/docs/en/plugins.html
files: \.(md|mdx|json|yaml|yml|toml|ini|cfg|properties|sh|ts|js|html|less|css)$