build: add husky + lint-staged

This commit is contained in:
Mathieu Schimmerling
2023-01-06 01:18:18 +01:00
parent 80fbda751e
commit 2795980815
6 changed files with 182 additions and 56 deletions

View File

@@ -10,7 +10,7 @@
"preview": "vite preview",
"lint": "eslint . --fix",
"lint:check": "eslint .",
"format": "prettier --ignore-path .gitignore --plugin-search-dir=. --write .",
"format": "prettier --cache --ignore-path .gitignore --plugin-search-dir=. --write .",
"format:check": "prettier --ignore-path .gitignore --plugin-search-dir=. . --check",
"build:content": "node scripts/generateContent.js",
"build:progress": "node scripts/generateReadMeProgress.js",
@@ -68,7 +68,8 @@
"typescript": "^4.9.4",
"unified": "^10.1.2",
"vite": "^4.0.4",
"vite-plugin-html": "^3.2.0"
"vite-plugin-html": "^3.2.0",
"vue": "^3.2.45"
},
"overrides": {
"@stefanprobst/remark-shiki": {
@@ -76,9 +77,7 @@
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx,vue,svelte}": [
"prettier --write",
"eslint --cache --fix"
]
"*.{js,jsx,ts,tsx,svelte,vue}": "eslint --cache --fix",
"*.{js,jsx,ts,tsx,svelte,vue,html,md,css,hbs}": "prettier --cache --write"
}
}