Skip to content

Commit

Permalink
fix: fix husky no effect
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidZORO committed May 23, 2020
1 parent a58158f commit b13f8d3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
22 changes: 8 additions & 14 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
const tasks = (arr) => arr.join(' && ');

// ALL GIT HOOKS DEFINED HERE ARE SUPPORTED
// https://git-scm.com/docs/githooks

module.exports = {
// ALL GIT HOOKS DEFINED HERE ARE SUPPORTED
// https://git-scm.com/docs/githooks
hooks: {
// https://www.npmjs.com/package/commitizen
// 'prepare-commit-msg': 'git cz --hook || true HUSKY_DEBUG',
//this is for linux ==> 'prepare-commit-msg': 'exec < /dev/tty && git cz --hook',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
// https://www.npmjs.com/package/commitizen
'prepare-commit-msg': 'git cz --hook || true HUSKY_DEBUG',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS HUSKY_USE_YARN',
'pre-commit': tasks([
//check nx before committing!!
// uncommented for now
//'nx test',
// pretty quick is explained here
// https://github.com/azz/pretty-quick
'pretty-quick --staged',
// lint-staged is explained here
// https://github.com/okonet/lint-staged#configuration.
'lint-staged --debug',
'pretty-quick --staged', // https://github.com/azz/pretty-quick
'lint-staged', // https://github.com/okonet/lint-staged#configuration.
]),
},
};
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,20 @@
"commit-version": "git add . && git commit -m \"chore(release): publish `node -p 'require(\"./lerna.json\").version'`\""
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/config-lerna-scopes": "^8.3.4",
"@types/eslint": "6.8.1",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/jest": "^25.2.3",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"babel-eslint": "^10.1.0",
"codecov": "^3.7.0",
"commitizen": "4.1.2",
"cross-env": "^7.0.2",
"cz-conventional-changelog": "3.2.0",
"eslint": "7.1.0",
"@types/jest": "^25.2.3",
"eslint-config-airbnb": "18.1.0",
"eslint-config-airbnb-typescript": "^7.2.1",
"eslint-config-prettier": "^6.11.0",
Expand All @@ -75,25 +82,18 @@
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.2",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-lerna-scopes": "^8.3.4",
"@commitlint/config-conventional": "^8.3.4",
"commitizen": "4.1.2",
"cz-conventional-changelog": "3.2.0",
"husky": "^4.2.5",
"tsconfig-paths": "^3.8.0",
"typescript": "3.9.3",
"codecov": "^3.7.0",
"jest": "^26.0.1",
"ts-jest": "26.0.0",
"lerna": "^3.21.0",
"lint-staged": "^10.2.6",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"stylelint": "^13.5.0",
"stylelint-config-standard": "^20.0.0",
"cross-env": "^7.0.2",
"stylelint-order": "4.0.0",
"ts-jest": "26.0.0",
"ts-node-dev": "^1.0.0-pre.44",
"pretty-quick": "^2.0.1",
"lerna": "^3.21.0"
"tsconfig-paths": "^3.8.0",
"typescript": "3.9.3"
}
}

0 comments on commit b13f8d3

Please sign in to comment.