Hacker News new | past | comments | ask | show | jobs | submit login

Because pre-commit can be tough to google sometimes, depending on your search history, here's the direct link: https://pre-commit.com/



I assumed the poster meant the git concept of pre-commit hooks, which is just a shell script - https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks


Your parent is correct. Here's our pre-commit config too FWIW:

  more .pre-commit-config.yaml
    repos:
      - repo: https://github.com/pre-commit/pre-commit-hooks
        rev: v2.1.0
        hooks:
          - id: end-of-file-fixer
          - id: check-json
          - id: check-yaml
  - repo: https://github.com/asottile/reorder_python_imports
    rev: v1.3.4
    hooks:
      - id: reorder-python-imports
        args: [--application-directories=gaia]
        language_version: python3
  - repo: https://github.com/ambv/black
    rev: stable
    hooks:
      - id: black
        language_version: python3
  - repo: local
    hooks:
      - id: eslint
        name: eslint
        entry: ./frontend/node_modules/.bin/eslint --fix
        language: node
        language_version: system
        files: \.(js|jsx|ts|tsx)$
  - repo: https://github.com/prettier/prettier
    rev: "1.15.3"
    hooks:
      - id: prettier
        files: \.(yml|yaml|md|json)$
        language_version: system




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: