55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
repos:
|
|
# Python linting and formatting
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.7.0
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix]
|
|
files: ^backend/
|
|
- id: ruff-format
|
|
files: ^backend/
|
|
|
|
# JavaScript/TypeScript linting
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
rev: v9.15.0
|
|
hooks:
|
|
- id: eslint
|
|
files: \.(js|ts|svelte)$
|
|
args: [--fix]
|
|
additional_dependencies:
|
|
- eslint@8.56.0
|
|
- eslint-plugin-svelte@2.35.1
|
|
- eslint-config-prettier@9.1.0
|
|
- "@typescript-eslint/eslint-plugin@7.0.0"
|
|
- "@typescript-eslint/parser@7.0.0"
|
|
|
|
# Prettier for formatting
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v4.0.0-alpha.8
|
|
hooks:
|
|
- id: prettier
|
|
files: \.(js|ts|json|yaml|yml|md|svelte)$
|
|
additional_dependencies:
|
|
- prettier@3.2.5
|
|
- prettier-plugin-svelte@3.1.2
|
|
|
|
# General file checks
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-added-large-files
|
|
args: [--maxkb=5000]
|
|
- id: check-merge-conflict
|
|
- id: detect-private-key
|
|
|
|
# Nix formatting
|
|
- repo: https://github.com/nix-community/nixpkgs-fmt
|
|
rev: v1.3.0
|
|
hooks:
|
|
- id: nixpkgs-fmt
|
|
|