/ .pre-commit-config.yaml
.pre-commit-config.yaml
 1  repos:
 2    - repo: local
 3      hooks:
 4        - id: eslint
 5          name: ESLint
 6          entry: npx eslint --fix
 7          language: system
 8          types: [file]
 9          files: \.(ts|tsx|js|jsx|mjs)$
10          exclude: ^(\.vite/|out/|build/|dist/|node_modules/)
11          pass_filenames: true
12  
13        - id: prettier
14          name: Prettier
15          entry: npx prettier --write --ignore-unknown
16          language: system
17          types: [file]
18          files: \.(ts|tsx|js|jsx|mjs|json|css|md|yml|yaml|html)$
19          exclude: ^(\.vite/|out/|build/|dist/|node_modules/|package-lock\.json)
20          pass_filenames: true
21  
22        - id: trufflehog
23          name: TruffleHog
24          description: Detect secrets in your data.
25          entry: bash -c 'trufflehog git file://. --since-commit HEAD --results=verified,unknown --fail'
26          language: system
27          stages: [pre-commit, pre-push]
28  
29    - repo: https://github.com/pre-commit/pre-commit-hooks
30      rev: v5.0.0
31      hooks:
32        - id: trailing-whitespace
33          exclude: ^(\.vite/|out/|build/|dist/)
34        - id: end-of-file-fixer
35          exclude: ^(\.vite/|out/|build/|dist/)
36        - id: check-json
37          exclude: ^(\.vite/|out/|build/|dist/)
38        - id: check-yaml
39        - id: check-added-large-files
40          args: ['--maxkb=1000']