Add pre-commit hook and setup script #129

Merged
raucao merged 4 commits from feature/pre_commit_linting into master 2019-06-09 11:53:41 +00:00
3 changed files with 3 additions and 8 deletions
Showing only changes of commit 698741ec09 - Show all commits

View File

@ -25,11 +25,6 @@ Each of the aragon apps are separate packages:
You can use `npm run install-all` to install all app dependencies at once.
We also recommend using our git hooks for linting staged files and other
convenient helpers. You can install them via:
$ npm run setup
### Local development chain
For local development it is recommended to use

View File

@ -8,6 +8,7 @@
},
"scripts": {
"install-all": "./scripts/every-app.sh \"npm install\"",
"postinstall": "sh scripts/git-hooks/install",
"build-json": "npm run compile-contracts && node ./scripts/build-json.js",
"repl": "truffle exec scripts/repl.js",
"seeds": "truffle exec scripts/seeds.js",
@ -23,8 +24,7 @@
"lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"",
"lint:contract-tests": "eslint apps/*/test",
"lint:wrapper": "eslint lib/",
"test": "echo \"Error: no test specified\" && exit 1",
"setup": "sh scripts/git-hooks/install"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",

View File

@ -1,2 +1,2 @@
#!/bin/sh
cp scripts/git-hooks/pre-commit .git/hooks
cp -f scripts/git-hooks/pre-commit .git/hooks