2024-10-03 05:23:31 +08:00
|
|
|
exclude: 'node_modules|.git'
|
2025-04-25 16:08:07 +05:30
|
|
|
default_stages: [pre-commit]
|
2024-10-03 05:23:31 +08:00
|
|
|
fail_fast: false
|
|
|
|
|
|
|
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2025-04-25 16:08:07 +05:30
|
|
|
rev: v5.0.0
|
2024-10-03 05:23:31 +08:00
|
|
|
hooks:
|
|
|
|
|
- id: trailing-whitespace
|
2025-04-25 16:08:07 +05:30
|
|
|
files: 'suppliers_portal.*'
|
|
|
|
|
exclude: '.*json$|.*txt$|.*csv|.*md|.*svg'
|
2024-10-03 05:23:31 +08:00
|
|
|
- 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
|
2025-04-25 16:08:07 +05:30
|
|
|
rev: v0.11.7
|
2024-10-03 05:23:31 +08:00
|
|
|
hooks:
|
|
|
|
|
- id: ruff
|
2025-04-25 16:08:07 +05:30
|
|
|
name: 'Run ruff linter and apply fixes'
|
|
|
|
|
args: ['--fix']
|
2024-10-03 05:23:31 +08:00
|
|
|
|
|
|
|
|
- id: ruff-format
|
2025-04-25 16:08:07 +05:30
|
|
|
name: 'Format Python code'
|
2024-10-03 05:23:31 +08:00
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
2025-04-25 16:08:07 +05:30
|
|
|
rev: v8.56.0
|
2024-10-03 05:23:31 +08:00
|
|
|
hooks:
|
|
|
|
|
- id: eslint
|
|
|
|
|
types_or: [javascript]
|
|
|
|
|
args: ['--quiet']
|
|
|
|
|
# Ignore any files that might contain jinja / bundles
|
|
|
|
|
exclude: |
|
2025-04-25 16:08:07 +05:30
|
|
|
(?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
|
2024-10-03 05:23:31 +08:00
|
|
|
|
|
|
|
|
ci:
|
2025-04-25 16:08:07 +05:30
|
|
|
autoupdate_schedule: weekly
|
|
|
|
|
skip: []
|
|
|
|
|
submodules: false
|