Skip to content

Commit 0754d1a

Browse files
build(package): move husky hooks from package.json to .huskyrc
Resolves error: ``` Warning: Setting commit-msg script in package.json > scripts will be deprecated Please move it to husky.hooks in package.json, a .huskyrc file, or a husky.config.js file Or run ./node_modules/.bin/husky-upgrade for automatic update See https://github.com/typicode/husky for usage ```
1 parent 3d1208b commit 0754d1a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.huskyrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "npm test && lint-staged",
4+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
5+
}
6+
}

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
"build:min": "NODE_ENV=production webpack -o dist/html-react-parser.min.js",
1111
"build:unmin": "NODE_ENV=development webpack -o dist/html-react-parser.js",
1212
"clean": "rm -rf dist",
13-
"commitmsg": "commitlint -e $GIT_PARAMS",
1413
"cover": "istanbul cover _mocha -- -R spec \"test/**/*\"",
1514
"coveralls": "cat coverage/lcov.info | coveralls",
1615
"lint": "eslint --ignore-path .gitignore .",
1716
"lint:fix": "npm run lint -- --fix",
18-
"precommit": "npm test && lint-staged",
1917
"prepublishOnly": "npm run build",
2018
"release": "standard-version --no-verify",
2119
"test": "mocha"

0 commit comments

Comments
 (0)