supplier-portal/.pre-commit-config.yaml
2025-04-25 16:14:30 +05:30

58 lines
1.5 KiB
YAML

exclude: 'node_modules|.git'
default_stages: [pre-commit]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
files: 'suppliers_portal.*'
exclude: '.*json$|.*txt$|.*csv|.*md|.*svg'
- id: check-yaml
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7
hooks:
- id: ruff
name: 'Run ruff linter and apply fixes'
args: ['--fix']
- id: ruff-format
name: 'Format Python code'
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.56.0
hooks:
- id: eslint
types_or: [javascript]
args: ['--quiet']
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
.*boilerplate.*|
.*node_modules.*|
cypress/.*|
suppliers_portal/public/dist/.*|
suppliers_portal/public/js/lib/.*|
suppliers_portal/public/supplier-portal/assets/.*|
suppliers_portal/templates/includes/.*
)$
- repo: local
hooks:
- id: prettier
name: prettier
entry: npx prettier -w . --config .prettierrc.cjs --ignore-path .prettierignore
language: system
ci:
autoupdate_schedule: weekly
skip: []
submodules: false