mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
Run pre-commit type check only for TypeScript (#1597)
* Prevent unnecessary type-checks * Remove commented code
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
if [[ "$OS" == "Windows_NT" ]]; then
|
||||
npx.cmd lint-staged
|
||||
npm.cmd run typecheck
|
||||
else
|
||||
npx lint-staged
|
||||
npm run typecheck
|
||||
fi
|
||||
|
||||
13
lint-staged.config.js
Normal file
13
lint-staged.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export default {
|
||||
'./**/*.js': (stagedFiles) => formatFiles(stagedFiles),
|
||||
|
||||
'./**/*.{ts,tsx,vue}': (stagedFiles) => [
|
||||
...formatFiles(stagedFiles),
|
||||
'tsc --noEmit',
|
||||
'tsc-strict'
|
||||
]
|
||||
}
|
||||
|
||||
function formatFiles(fileNames) {
|
||||
return [`prettier --write ${fileNames.join(' ')}`]
|
||||
}
|
||||
@@ -93,10 +93,4 @@
|
||||
"vue-router": "^4.4.3",
|
||||
"zod": "^3.23.8",
|
||||
"zod-validation-error": "^3.3.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"./**/*.{js,ts,tsx,vue}": [
|
||||
"prettier --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user