Commit 41dc2478 authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

add package.json to setup git commit hooks

using husky + lint-staged
parent 3d113b4f
...@@ -14,3 +14,4 @@ slapos.cookbook.egg-info ...@@ -14,3 +14,4 @@ slapos.cookbook.egg-info
.eggs/ .eggs/
*.egg/ *.egg/
TEST_KNOWN_HOSTS TEST_KNOWN_HOSTS
node_modules
This diff is collapsed.
{
"dependencies": {
"husky": "^1.1.2",
"lint-staged": "^7.3.0"
},
"lint-staged": {
"*.json": [
"python2 ./format-json",
"git add"
],
"{components,software,stack}/**": [
"python -c 'import sys, os.path, subprocess; [subprocess.check_call((\"python2\", \"./update-hash\", buildout_hash)) for buildout_hash in { os.path.join(os.path.dirname(staged), \"buildout.hash.cfg\") for staged in sys.argv[1:]} if os.path.exists(buildout_hash)]'",
"python -c 'import sys, os.path, subprocess; [subprocess.check_call((\"git\", \"add\", buildout_hash)) for buildout_hash in { os.path.join(os.path.dirname(staged), \"buildout.hash.cfg\") for staged in sys.argv[1:]} if os.path.exists(buildout_hash)]'"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment