Add gitleaks, shellcheck, and eslint pre-commit hooks

- gitleaks: Detect hardcoded secrets before commit
- shellcheck: Static analysis for shell scripts
- eslint: JavaScript linting
This commit is contained in:
LearningCircuit
2025-11-27 01:11:47 +01:00
parent 554444041b
commit e6d5de2fda

View File

@@ -10,6 +10,27 @@ repos:
args: ['--maxkb=1000']
- id: check-case-conflict
- id: forbid-new-submodules
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.3
hooks:
- id: gitleaks
name: Detect secrets with gitleaks
description: "Detect hardcoded secrets like passwords, API keys, and tokens"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
name: Shellcheck - lint shell scripts
description: "Shell script static analysis tool"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.27.0
hooks:
- id: eslint
name: ESLint - lint JavaScript
files: \.(js|mjs)$
exclude: (node_modules|dist|build|\.min\.js)
additional_dependencies:
- eslint@9.27.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.5