chore: add lint-staged and edit pre-commit

This commit is contained in:
Slinetrac
2025-10-07 17:32:49 +08:00
parent bf4e1a3270
commit 0d12103085
6 changed files with 408 additions and 18 deletions

6
lint-staged.config.js Normal file
View File

@@ -0,0 +1,6 @@
export default {
// Run Prettier on all supported file types
"*.{js,jsx,ts,tsx,json,css,scss,md,html}": ["prettier --write"],
// Run ESLint on JavaScript/TypeScript files with cache for performance
"*.{js,jsx,ts,tsx}": ["eslint --cache --cache-location .eslintcache --fix", "eslint --cache --cache-location .eslintcache"],
};