diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..36af219 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index 3c8b712..0e77bb1 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "prepublishOnly": "npm run build", "test": "karma start", "test:watch": "karma start --no-single-run --no-coverage", - "lint": "eslint 'src/**/*.js' 'coreModulePackages/**/*.js'" + "lint": "eslint 'src/**/*.js' 'coreModulePackages/**/*.js'", + "prepare": "husky install" }, "author": { "name": "Adobe Systems", @@ -61,11 +62,6 @@ "webpack": "^5.94.0", "yargs": "^17.7.2" }, - "husky": { - "hooks": { - "pre-push": "npm test" - } - }, "lint-staged": { "(src/**/*.js|coreModulePackages/**/*.js)": [ "npm run lint -- --fix"