Commit 3522a7da authored by Jérome Perrin's avatar Jérome Perrin

pre-commit hook: version up and python3 support

parent 700655a2
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"dependencies": {
"husky": "^1.1.2",
"lint-staged": "^7.3.0"
},
"lint-staged": { "lint-staged": {
"*.json": [ "*.json": [
"python2 ./format-json", "./format-json"
"git add"
], ],
"{component,software,stack}/**": [ "{component,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((\"./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)]'" "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": { "devDependencies": {
"hooks": { "husky": "^7.0.0",
"pre-commit": "lint-staged" "lint-staged": "^12.1.2"
} },
"scripts": {
"prepare": "husky install"
} }
} }
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