99 Star 1.4K Fork 550

GVPHuLaSpark/HuLa

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.lintstagedrc.mjs 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
Clover You 提交于 2026-03-18 13:25 +08:00 . fix(lint-staged): ignore .vscode files
import path from 'node:path'
function createCommand(prefix) {
return (filenames) => `${prefix} ${filenames.map((f) => path.relative(process.cwd(), f)).join(' ')}`
}
export default {
// JavaScript/TypeScript 文件使用 Biome (排除 .d.ts 文件和tauri-plugin-hula目录)
'*.{js,jsx,ts,tsx,json}': [
(filenames) => {
const filteredFiles = filenames.filter(
(f) =>
!f.includes('src-tauri/') && !f.includes('tauri-plugin-hula/') && !f.includes('public/') && !f.endsWith('.d.ts') && !f.includes('.vscode/')
)
return filteredFiles.length > 0
? `biome check --write --unsafe ${filteredFiles.map((f) => path.relative(process.cwd(), f)).join(' ')}`
: 'echo "No files to check"'
}
],
// Vue 文件:使用 Biome 检查和修复,然后用 Prettier 格式化
'*.vue': [createCommand('biome check --write --unsafe'), createCommand('prettier --write')],
// Rust 代码:使用 manifest-path 指定 workspace,避免切换目录
'src-tauri/**/*.rs': () => 'cargo fmt --manifest-path src-tauri/Cargo.toml'
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/HuLaSpark/HuLa.git
git@gitee.com:HuLaSpark/HuLa.git
HuLaSpark
HuLa
HuLa
master

搜索帮助