Add pre-commit hook
This commit is contained in:
parent
e4a327efb0
commit
375be57ed7
3 changed files with 22 additions and 1 deletions
3
.husky/pre-commit
Normal file
3
.husky/pre-commit
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
echo Formatting...
|
||||||
|
npm run format
|
||||||
|
echo Successfully formatted.
|
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -16,6 +16,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "14.1.1",
|
"eslint-config-next": "14.1.1",
|
||||||
|
"husky": "^9.0.11",
|
||||||
"standard": "^17.1.0"
|
"standard": "^17.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2298,6 +2299,21 @@
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/husky": {
|
||||||
|
"version": "9.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz",
|
||||||
|
"integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"husky": "bin.mjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/typicode"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ignore": {
|
"node_modules/ignore": {
|
||||||
"version": "5.3.1",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"link": "npx standard",
|
"link": "npx standard",
|
||||||
"format": "npx standard --fix"
|
"format": "npx standard --fix",
|
||||||
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "14.1.1",
|
"next": "14.1.1",
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "14.1.1",
|
"eslint-config-next": "14.1.1",
|
||||||
|
"husky": "^9.0.11",
|
||||||
"standard": "^17.1.0"
|
"standard": "^17.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue