来源信息
- 仓库
- redpanda-data/ui-harness
- 最近来源活动
- 2026年5月27日 14:03
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 34
- 分支
- 4
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- setup-pre-commit
- description
- Set up Husky, lint-staged, Prettier, typecheck, and test pre-commit.
# Setup Pre-Commit
Sets up Husky + lint-staged + Prettier + optional type/test scripts.
## Steps
1. Detect package manager from lockfile. Default npm if unclear.
2. Install dev deps: `husky lint-staged prettier`.
3. Init Husky (`husky init` using detected package runner).
4. Write `.husky/pre-commit`:
```bash
<pm> lint-staged
<pm> run typecheck # only if script exists
<pm> run test # only if script exists
```
5. Create `.lintstagedrc`:
```json
{"*":"prettier --ignore-unknown --write"}
```
6. Create `.prettierrc` only if no Prettier config exists.
7. Verify hook executable, `prepare` script present, lint-staged works.
在 GitHub 查看