build(lint): add lint-staged and husky git hooks to automatically lint on commit

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-05-26 17:36:56 +02:00
parent 98e8546c9a
commit 54f656d239
3 changed files with 327 additions and 4 deletions

View File

@@ -14,7 +14,14 @@
"story:build": "histoire build",
"story:preview": "histoire preview",
"test": "vitest",
"coverage": "vitest run --coverage"
"coverage": "vitest run --coverage",
"prepare": "cd ../ && husky install"
},
"lint-staged": {
"**/*.{js,ts,vue}": [
"eslint --fix",
"prettier --write"
]
},
"dependencies": {
"@absinthe/socket": "^0.2.1",
@@ -116,7 +123,9 @@
"eslint-plugin-vue": "^9.3.0",
"flush-promises": "^1.0.2",
"histoire": "^0.16.1",
"husky": "^8.0.3",
"jsdom": "^22.0.0",
"lint-staged": "^13.2.2",
"mock-apollo-client": "^1.1.0",
"prettier": "^2.2.1",
"prettier-eslint": "^15.0.1",