fabasoad/translation-action

View on GitHub
.pre-commit-config.yaml

Summary

Maintainability
Test Coverage
---
default_install_hook_types: ["pre-commit", "pre-push"]
default_stages: ["pre-commit", "pre-push"]
exclude: ^(dist/.*\.js|\.yarn/.*)$
minimum_pre_commit_version: 2.18.0
repos:
  - repo: local
    hooks:
      - id: build
        name: Build
        entry: yarn run build
        language: system
        pass_filenames: false
        verbose: true
        stages: ["pre-push"]
      - id: lint
        name: Lint
        entry: yarn run lint
        language: system
        pass_filenames: false
        verbose: false
        stages: ["pre-push"]
      - id: test
        name: Unit tests
        entry: yarn test
        language: system
        pass_filenames: false
        verbose: true
        stages: ["pre-push"]
  # Security
      - id: audit
        name: Yarn audit
        entry: yarn npm audit --all
        language: system
        pass_filenames: false
        verbose: false
        stages: ["pre-push"]
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.5.0
    hooks:
      - id: detect-secrets
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.21.3
    hooks:
      - id: gitleaks
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: v1.0.0
    hooks:
      - id: snyk-test
        args:
          - --snyk-args=--all-projects --severity-threshold=low
          - --hook-args=--log-level debug
        stages: ["pre-push"]
  - repo: https://github.com/fabasoad/pre-commit-grype
    rev: v0.6.1
    hooks:
      - id: grype-dir
        args:
          - --grype-args=--by-cve --fail-on=low --exclude=**/node_modules
          - --hook-args=--log-level debug
        stages: ["pre-push"]
  - repo: https://github.com/google/osv-scanner
    rev: v1.9.1
    hooks:
      - id: osv-scanner
        args:
          - --lockfile=yarn.lock
        verbose: true
        stages: ["pre-push"]
  # Markdown
  - repo: https://github.com/igorshubovych/markdownlint-cli
    rev: v0.43.0
    hooks:
      - id: markdownlint-fix
        stages: ["pre-commit"]
  # Yaml
  - repo: https://github.com/adrienverge/yamllint
    rev: v1.35.1
    hooks:
      - id: yamllint
        stages: ["pre-push"]
  # GitHub Actions
  - repo: https://github.com/rhysd/actionlint
    rev: v1.7.4
    hooks:
      - id: actionlint
        args: ["-pyflakes="]
        stages: ["pre-commit"]
  # Other
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-merge-conflict
      - id: check-json
        stages: ["pre-push"]
      - id: check-toml
        stages: ["pre-push"]
      - id: detect-private-key
      - id: end-of-file-fixer
      - id: mixed-line-ending
        args: ["--fix=lf"]
      - id: no-commit-to-branch
        stages: ["pre-commit"]
      - id: trailing-whitespace