mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-08-05 13:43:30 -07:00
build: add husky, support lint code when pre-commit (#178)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
npm run pre-commit
|
||||
Generated
+810
-12
File diff suppressed because it is too large
Load Diff
+10
-1
@@ -22,7 +22,8 @@
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
||||
"lint": "eslint src/ --ext .ts,.tsx && prettier src/ --check",
|
||||
"lint:fix": "eslint src/ --ext .ts,.tsx --fix && prettier src/ --write",
|
||||
"debug": "node --inspect --loader ts-node/esm src/index.ts -V"
|
||||
"debug": "node --inspect --loader ts-node/esm src/index.ts -V",
|
||||
"pre-commit": "lint-staged"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -61,10 +62,18 @@
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-header": "^3.1.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"husky": "^9.0.11",
|
||||
"jest": "^29.7.0",
|
||||
"lint-staged": "^15.2.2",
|
||||
"prettier": "3.0.3",
|
||||
"ts-jest": "^29.1.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"lint-staged": {
|
||||
"{,src/**/}*.{ts,tsx}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user