chore: configure pre-commit stages and add build hook
This commit is contained in:
+12
-1
@@ -1,3 +1,4 @@
|
||||
default_stages: [pre-commit, pre-push, manual]
|
||||
exclude: ^(dist|node_modules)/
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
@@ -39,8 +40,18 @@ repos:
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
exclude: (.txt$|.ipynb$|README.md$|readme.mde$)
|
||||
exclude: (.txt$|.ipynb$|README.md$)
|
||||
- id: trailing-whitespace
|
||||
exclude: (.txt$|README.md$)
|
||||
- id: mixed-line-ending
|
||||
args: [--fix=lf]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: build
|
||||
name: rebuild-distribution
|
||||
entry: npm run build
|
||||
language: system
|
||||
files: ^(index\.js|monitor\.js|package\.json|package-lock\.json)$
|
||||
pass_filenames: false
|
||||
stages: [pre-commit]
|
||||
|
||||
Reference in New Issue
Block a user