- lint-staged: TS 暂移除 eslint(ESLint 9 flat config 缺失) - lint-staged: Go 暂移除 golangci-lint(未安装) - lint-staged: gofmt 仅处理 .go(不处理 .mod/.sum) - husky: 去除 commit-msg/pre-commit 的 UTF-8 BOM - husky: 新增 pre-push hook(Go 编译检查)
11 lines
429 B
JavaScript
11 lines
429 B
JavaScript
module.exports = {
|
|
// ESLint 9 flat config 迁移完成后恢复:['eslint --fix', 'prettier --write']
|
|
'*.{ts,tsx}': ['prettier --write'],
|
|
// golangci-lint 安装后恢复:['gofmt -w', 'golangci-lint run --fix']
|
|
// gofmt 仅处理 .go 文件,.mod/.sum 不需要格式化
|
|
'*.go': ['gofmt -w'],
|
|
'*.{py}': ['ruff check --fix', 'ruff format'],
|
|
'*.proto': ['buf format --write'],
|
|
'*.md': ['prettier --write'],
|
|
};
|