diff --git a/.gitignore b/.gitignore index e7cb4e4..985cdf4 100644 --- a/.gitignore +++ b/.gitignore @@ -68,9 +68,6 @@ devenv.local.nix # direnv .direnv -# pre-commit -.pre-commit-config.yaml - # python version lock .python-version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0089e66 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,45 @@ +repos: + - repo: local + hooks: + - id: check-version-increment + name: Check Version Increment + entry: python scripts/hooks/pre-push/check_version_increment.py + language: system + pass_filenames: false + stages: [pre-push] + + - id: tests + name: Run Python Tests + entry: uv run test + language: system + pass_filenames: false + stages: [pre-push] + + - id: prettier-with-jinja + name: Prettier (with Jinja support) + entry: bun run prettier -c + language: system + types_or: + [javascript, jsx, ts, tsx, css, scss, sass, less, yaml, json, markdown, html, jinja] + stages: [pre-push] + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.9 + hooks: + - id: ruff + stages: [pre-push] + - id: ruff-format + stages: [pre-push] + + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v9.26.0 + hooks: + - id: eslint + additional_dependencies: + - eslint@latest + - eslint/js + - eslint/json + - eslint-plugin-react + + files: \.(js|ts|jsx|tsx)$ + stages: [pre-push]