webi-installers
webi-installers copied to clipboard
Chore: Add `husky` to the repo
As per https://github.com/typicode/husky#install:
- Add
husky(no transitive dependencies):npm install --save-dev husky - Add a new
preparetopackage.json.scripts:npm set-script prepare "husky install" npm run prepare - Create the new
pre-commitscriptnpx husky add .husky/pre-commit "npm run fmt" npx husky add .husky/pre-commit "npm run lint" git add .husky/pre-commit
Hi @coolaj86 , I'm trying to raise a PR, but when I try to commit my code it says fmt script is missing in package.json, could I get help on that ?
Those commands need to be set / updated.
npm set-script fmt "npm run prettier; npm run shfmt"
npm set-script jshint "npx [email protected] -c ./.jshintrc */*.js"
npm set-script shellcheck "shellcheck -s sh --exclude=SC2154,SC2034 -- */*.sh */*/*.sh"
npm set-script lint "npm run jshint; npm run shellcheck"
@coolaj86 I have raised a PR for this one. please check
Closed via #515 and #659