Skip to content

Commit f3c9e18

Browse files
chore: setup pre-commit hooks and ruff linting
1 parent 0abd1af commit f3c9e18

4 files changed

Lines changed: 171 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-toml
9+
- id: check-added-large-files
10+
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
rev: v0.9.0
13+
hooks:
14+
- id: ruff
15+
args: [ --fix ]
16+
- id: ruff-format
17+
18+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
19+
rev: v9.20.0
20+
hooks:
21+
- id: commitlint
22+
stages: [commit-msg]
23+
additional_dependencies: ['@commitlint/config-conventional']

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ packages = ["annotator"]
2121
include-package-data = true
2222

2323
[tool.setuptools.package-data]
24-
annotator = ["templates/*.json"]
24+
annotator = ["templates/*.json"]
25+
26+
[dependency-groups]
27+
dev = [
28+
"pre-commit>=4.5.1",
29+
]

0 commit comments

Comments
 (0)