Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

docs: make pre-commit optional and add comment (#2112)

tianzhou54f88207b665
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6183134a00..43d180ece3 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,4 +1,5 @@
repos:
+ # Frontend lint
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.3.0
hooks:
@@ -6,12 +7,21 @@ repos:
files: frontend/.+\.([jt]sx?|vue)$
types: [file]
args: [--fix]
+ # Frontend formatting
+ - repo: https://github.com/pre-commit/mirrors-prettier
+ rev: "v2.4.1"
+ hooks:
+ - id: prettier
+ files: frontend/src/locales/.+\.json$
+ types_or: [json]
+ # Commit message check
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v2.2.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
+ # Standardize whitespace, newline
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
@@ -22,9 +32,3 @@ repos:
rev: v1.44.0
hooks:
- id: golangci-lint
- - repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v2.4.1"
- hooks:
- - id: prettier
- files: frontend/src/locales/.+\.json$
- types_or: [json]
diff --git a/README.md b/README.md
index cbe691907d..b80ffd13ce 100644
--- a/README.md
+++ b/README.md
@@ -155,7 +155,7 @@ working on the code:
git clone https://github.com/bytebase/bytebase
```
-1. Set up pre-commit hooks.
+1. (Optional) Set up pre-commit hooks.
- Install [pre-commit](https://pre-commit.com/index.html#install)