Brandmeister Last Heard Monitor/Notifier
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(pre-commit): add pre-commit configuration for code quality checks

Introduce a pre-commit configuration file to automate code quality
checks before commits. This setup includes hooks for preventing commits
to the main branch, fixing end-of-file issues, removing trailing
whitespace, and checking YAML, JSON, TOML, and AST files. It also
includes a hook for detecting debug statements and a gitleaks hook for
detecting sensitive information. Prettier is configured to format JSON,
TOML, YAML, and Markdown files. This ensures consistent code quality and
prevents common errors from being committed.

+27
+27
.pre-commit-config.yaml
··· 1 + # .pre-commit-config.yaml 2 + # This file contains the configuration for pre-commit hooks. 3 + # Each hook helps maintain code quality by running automated checks before commits. 4 + # 5 + exclude: '(\..*\.y[a]?ml|\.github/workflows)' 6 + repos: 7 + - repo: https://github.com/pre-commit/pre-commit-hooks 8 + rev: v5.0.0 9 + hooks: 10 + - id: no-commit-to-branch 11 + args: ['--branch', 'main'] # prevent local commits to main branch 12 + - id: end-of-file-fixer 13 + - id: trailing-whitespace 14 + - id: check-yaml 15 + - id: check-json 16 + - id: check-toml 17 + - id: check-ast 18 + - id: debug-statements 19 + - repo: https://github.com/gitleaks/gitleaks 20 + rev: v8.18.2 21 + hooks: 22 + - id: gitleaks 23 + - repo: https://github.com/pre-commit/mirrors-prettier 24 + rev: v4.0.0-alpha.8 25 + hooks: 26 + - id: prettier 27 + types_or: [json, toml, yaml, markdown]