用途:为项目建立统一的代码格式化与 lint 规范,覆盖 JavaScript/TypeScript、Python、Go、Rust 等栈。
主要能力:检测语言/框架后选择工具(JS/TS 用 Prettier、ESLint + typescript-eslint、EditorConfig、Husky + lint-staged;Python 用 Black + isort、Ruff 或 Flake8 + mypy、pre-commit;Go 用 gofmt + goimports、golangci-lint;Rust 用 rustfmt、clippy);生成 .prettierrc.json、.eslintrc.json、.editorconfig、pyproject.toml 等配置;添加 format、lint、format:check、lint:fix、typecheck 等脚本;配置 VS Code、IntelliJ 设置与扩展推荐;设置 Git 钩子;提供 GitHub Actions lint 工作流。
使用方式:按栈安装依赖,例如 Node 执行 npm install --save-dev husky lint-staged 与 npx husky init;Python 执行 pip install pre-commit 与 pre-commit install。随后写入对应配置文件、脚本、钩子与 CI 工作流,并在 README 或 CONTRIBUTING.md 记录运行方式。紧急情况可用 git commit --no-verify 跳过钩子。
适用场景:新项目初始化、团队统一风格、接入 CI 与提交前自动格式化。
限制:具体版本、规则与效果需按项目实际验证;资料未提供收费、平台支持范围等信息。