merge: Run "style" and "test" scripts automatically when committing new changes (#918)

* feat: add style and run scripts on pre-commit hooks

* Update package-lock.json
This commit is contained in:
Akibur Rahman
2022-03-09 21:11:14 +06:00
committed by GitHub
parent 35ba618355
commit 5198af80a9
3 changed files with 11016 additions and 8 deletions

5
.husky/pre-commit Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run style
npm run test

11015
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@
"main": "", "main": "",
"scripts": { "scripts": {
"test": "jest --no-cache", "test": "jest --no-cache",
"style": "standard" "style": "standard",
"prepare": "husky install"
}, },
"author": "TheAlgorithms", "author": "TheAlgorithms",
"license": "GPL-3.0", "license": "GPL-3.0",
@ -27,6 +28,7 @@
"devDependencies": { "devDependencies": {
"babel-jest": "^26.3.0", "babel-jest": "^26.3.0",
"globby": "^12.0.2", "globby": "^12.0.2",
"husky": "^7.0.4",
"jest": "^26.4.2", "jest": "^26.4.2",
"standard": "^16.0.4" "standard": "^16.0.4"
} }