fix: 更新 lint-staged 配置,支持 .tsx 文件格式
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
echo "🔧 正在运行 pre-commit 钩子..."
|
echo "🔧 正在运行 pre-commit 钩子..."
|
||||||
pnpm -v
|
pnpm exec lint-staged
|
||||||
echo "✅ pnpm 已安装,正在执行 lint-staged..."
|
echo "✅ pnpm 已安装,正在执行 lint-staged..."
|
||||||
|
|
||||||
# if command -v pnpm >/dev/null 2>&1; then
|
# if command -v pnpm >/dev/null 2>&1; then
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
"knip": "pnpm dlx knip"
|
"knip": "pnpm dlx knip"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.{js,ts,vue}": [
|
"src/**/*.{js,ts,tsx,vue}": [
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
"eslint --fix"
|
"eslint --fix"
|
||||||
]
|
]
|
||||||
|
@ -3,4 +3,5 @@ import App from './App.vue';
|
|||||||
import { setupPlugins } from './plugins';
|
import { setupPlugins } from './plugins';
|
||||||
|
|
||||||
const autoInstallModules = import.meta.glob('./plugins/*.ts', { eager: true });
|
const autoInstallModules = import.meta.glob('./plugins/*.ts', { eager: true });
|
||||||
|
|
||||||
setupPlugins(createApp(App), autoInstallModules).mount('#app');
|
setupPlugins(createApp(App), autoInstallModules).mount('#app');
|
||||||
|
Reference in New Issue
Block a user