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

View File

@@ -25,9 +25,14 @@
"publish-version": "node scripts/publish-version.mjs",
"fmt": "cargo fmt --manifest-path ./src-tauri/Cargo.toml",
"clippy": "cargo clippy --manifest-path ./src-tauri/Cargo.toml",
"lint": "eslint -c eslint.config.ts --cache src",
"lint": "eslint -c eslint.config.ts --cache --cache-location .eslintcache src",
"lint:fix": "eslint -c eslint.config.ts --cache --cache-location .eslintcache --fix src",
"lint:staged": "eslint -c eslint.config.ts --cache --cache-location .eslintcache",
"lint:all": "node scripts/lint-all.mjs",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"type-check": "tsc --noEmit",
"validate": "pnpm format:check && pnpm lint && pnpm type-check"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
@@ -100,6 +105,7 @@
"globals": "^16.4.0",
"https-proxy-agent": "^7.0.6",
"jiti": "^2.6.1",
"lint-staged": "^15.4.2",
"meta-json-schema": "^1.19.14",
"node-fetch": "^3.3.2",
"prettier": "^3.6.2",