首页/ AI 技能 / @skilllib/skill-2014279427432067074
Skill站外收录 @skilllib/skill-2014279427432067074

code-formatter

自动检测并修正代码文件的格式问题,支持 JavaScript、TypeScript、JSON、CSS、Markdown 等多种语言,确保代码风格统一、符合项目规范,适用于日常开发中的格式清理与标准化需求。

0.0 (0) 134 次安装 原作者 编程导航
收录于 2026-01-22

Skills.MD

# Code Formatter ## Overview This skill provides automated assistance for the described functionality. ## Prerequisites - Node.js and npm/npx installed - Prettier available globally or locally - Write permissions for target files - Supported file types in the project ## Instructions 1. Analyze current formatting (`prettier --check`) and identify files to update. 2. Configure formatting rules (`.prettierrc`, `.editorconfig`) for the project. 3. Apply formatting (`prettier --write`) to the target files/directories. 4. Add ignore patterns (`.prettierignore`) for generated/vendor outputs. 5. Optionally enforce formatting via git hooks (husky/lint-staged). See `{baseDir}/references/implementation.md` for detailed implementation guide. ## Output ## Error Handling See `{baseDir}/references/errors.md` for comprehensive error handling. ## Examples See `{baseDir}/references/examples.md` for detailed examples. ## Resources - name: Check formatting - name: Enforce formatting - **ESLint** - Linting and code quality - **Stylelint** - CSS/SCSS linting - **Markdownlint** - Markdown style checking

评论 0

还没有评论,来抢沙发。