Making pre-commit powerful again.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
@@ -67,10 +67,26 @@ repos:
|
||||
files: ^frontend/.*\.(js|ts|vue)$
|
||||
pass_filenames: false
|
||||
|
||||
# Prettier (only if src directory exists)
|
||||
# Prettier
|
||||
- id: prettier
|
||||
name: prettier
|
||||
entry: bash -c 'cd frontend && if [ -d src ]; then npm run format; else echo "Skipping prettier - no src directory"; fi'
|
||||
entry: bash -c 'cd frontend && npm run format'
|
||||
language: system
|
||||
files: ^frontend/.*\.(js|ts|vue|json|css|scss|md)$
|
||||
pass_filenames: false
|
||||
|
||||
# TypeScript type checking
|
||||
- id: typescript-check
|
||||
name: typescript-check
|
||||
entry: bash -c 'cd frontend && npm run type-check'
|
||||
language: system
|
||||
files: ^frontend/.*\.(ts|vue)$
|
||||
pass_filenames: false
|
||||
|
||||
# TSDoc linting
|
||||
- id: tsdoc-lint
|
||||
name: tsdoc-lint
|
||||
entry: bash -c 'cd frontend && npm run lint:tsdoc'
|
||||
language: system
|
||||
files: ^frontend/.*\.(ts|vue)$
|
||||
pass_filenames: false
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"@vitejs/plugin-vue": "^5.0.0",
|
||||
"@vue/tsconfig": "^0.5.0",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-jsdoc": "^50.0.0",
|
||||
"eslint-plugin-tsdoc": "^0.3.0",
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"prettier": "^3.0.0",
|
||||
"typescript": "~5.3.0",
|
||||
|
||||
Reference in New Issue
Block a user