chore: 更新 pre-commit 钩子,添加 TypeScript 格式化设置并清理 VSCode 配置
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo "Running pre-commit hook..."
|
||||
|
||||
if command -v pnpm >/dev/null 2>&1; then
|
||||
|
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@ -3,17 +3,12 @@
|
||||
"source.fixAll": "explicit"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]":{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.preferences.autoImportFileExcludePatterns": ["vue-router/auto$"],
|
||||
// https://github.com/antfu/vscode-file-nesting-config
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
||||
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
||||
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig"
|
||||
}
|
||||
"typescript.preferences.autoImportFileExcludePatterns": ["vue-router/auto$"]
|
||||
}
|
||||
|
@ -7,18 +7,15 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --build --force",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write src/",
|
||||
"prepare": "husky",
|
||||
"dev+preview": "bunx dev-and-preview@1.0.0",
|
||||
"taze": "pnpx taze",
|
||||
"playwright": "playwright test",
|
||||
"playwright:ui": "playwright test --ui",
|
||||
"playwright:chromium": "playwright test --project=chromium",
|
||||
"depcheck": "depcheck"
|
||||
"playwright:chromium": "playwright test --project=chromium"
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,ts,vue}": [
|
||||
@ -75,6 +72,8 @@
|
||||
"@vue/eslint-config-typescript": "^14.1.1",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"commitizen": "^4.3.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"depcheck": "^1.4.7",
|
||||
"eruda": "^3.4.0",
|
||||
"eslint": "^9.12.0",
|
||||
|
7
src/pages/a/index.vue
Normal file
7
src/pages/a/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped></style>
|
Reference in New Issue
Block a user