Files
firezone/.github/pre-commit-config.yaml

64 lines
1.8 KiB
YAML

repos:
- repo: local
hooks:
- id: codespell
name: "python: codespell"
args: [--config=.github/codespellrc]
entry: codespell
language: system
pass_filenames: false
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: mixed-line-ending
args: ["--fix=lf"]
description: Forces to replace line ending by the UNIX 'lf' character.
exclude: "(^website/public/images/|^kotlin/android/gradlew.bat|^rust/windows-client/wintun/|^elixir/apps/web/priv/static/)"
- id: check-yaml
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: (^website/public/images/|^elixir/apps/web/priv/static/)
- id: trailing-whitespace
exclude: ^website/public/images/
- id: check-merge-conflict
- id: no-commit-to-branch
args:
- -b
- master
- --pattern
- '^(?!((chore|feat|feature|bug|fix|build|ci|docs|style|refactor|perf|test|revert)\/[@a-zA-Z0-9\-\.\/]+)$).*'
# Third party pre-commit hooks
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args: ["--severity=warning"]
exclude: ^.*/gradlew$
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
rev: v2.2.0
hooks:
- id: shell-fmt
args:
- -i
- "4"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
# Exclude non-website files for now
# TODO: Lint these files in all directories
exclude: "^(?!website/)"
types_or:
- javascript
- jsx
- css
- scss
- json
- mdx
- markdown
- html
- xml