Skip to content

Commit 1bf9e59

Browse files
feat(chore): configure pre-commit hook (fixes #4532) (#4552)
* chore: add husky and lint-staged as devDeps * feat: configure pre-commit hook * chore: update lock file Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
1 parent bc801a7 commit 1bf9e59

File tree

2 files changed

+440
-10
lines changed

2 files changed

+440
-10
lines changed

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@
7676
"release": "npm run prettify && npm run test && npm run build && standard-version",
7777
"postinstall": "opencollective || exit 0"
7878
},
79+
"husky": {
80+
"hooks": {
81+
"pre-commit": "lint-staged"
82+
}
83+
},
84+
"lint-staged": {
85+
"*{.js,.md,.vue}": "eslint --ext",
86+
"**/*.{js,json,md,scss,ts,vue}": [
87+
"prettier --write",
88+
"git add"
89+
]
90+
},
7991
"dependencies": {
8092
"@nuxt/opencollective": "^0.3.0",
8193
"bootstrap": ">=4.4.1 <5.0.0",
@@ -121,8 +133,10 @@
121133
"gh-pages": "^2.2.0",
122134
"highlight.js": "^9.17.1",
123135
"html-loader": "^0.5.5",
136+
"husky": "^3.1.0",
124137
"jest": "^24.9.0",
125138
"jest-environment-jsdom-fourteen": "^1.0.1",
139+
"lint-staged": "^9.5.0",
126140
"loader-utils": "^1.2.3",
127141
"lodash": "^4.17.15",
128142
"marked": "^0.8.0",

0 commit comments

Comments
 (0)