Added pre-commit hook (#1024)

* Added pre-commit hook

* Updated pre-commit hook

* New NL at EOF

---------

Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
This commit is contained in:
Smit Parmar 2023-06-13 22:37:22 +05:30 committed by GitHub
parent 8120ddc228
commit 1e3141907a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

29
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,29 @@
repos:
- repo: local
hooks:
- id: lint-py-fix
name: Fix Python Lint
entry: hatch run lint-py --fix
language: system
pass_filenames: false
- repo: local
hooks:
- id: lint-py-check
name: Check Python Lint
entry: hatch run lint-py
language: system
pass_filenames: false
- repo: local
hooks:
- id: lint-js-fix
name: Fix JS Lint
entry: hatch run lint-js --fix
language: system
pass_filenames: false
- repo: local
hooks:
- id: lint-js-check
name: Check JS Lint
entry: hatch run lint-py
language: system
pass_filenames: false

View file

@ -21,6 +21,7 @@ dependencies = [
# publish
"semver >=2, <3",
"twine",
"pre-commit",
]
[tool.hatch.envs.default.scripts]