chore: add lint-staged

This commit is contained in:
tzhangchi
2022-12-24 23:42:30 +08:00
parent 57959f97c8
commit ca45b0c3a3
3 changed files with 300 additions and 4 deletions
+9 -2
View File
@@ -13,7 +13,12 @@
"test": "playwright test",
"test:e2e": "playwright test",
"test:e2e:codegen": "npx playwright codegen http://localhost:8080",
"test:unit": "jest"
"test:unit": "jest",
"postinstall": "husky install"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown",
"*.{ts,tsx,js,jsx}": "npx eslint --cache --fix"
},
"devDependencies": {
"@jest/globals": "^29.3.1",
@@ -29,7 +34,9 @@
"jest": "^29.3.1",
"prettier": "^2.7.1",
"ts-jest": "^29.0.3",
"typescript": "^4.9.3"
"typescript": "^4.9.3",
"lint-staged": "^13.1.0",
"husky": "^8.0.2"
},
"eslintConfig": {
"root": true,