返回 Skill 列表
extension
分类: 开发与工程无需 API Key

code-formatter

使用prettier和eslint格式化代码文件。当用户想要格式化代码、修复linting问题或清理代码风格时使用。

person作者: jakexiaohubgithub

Code Formatter Skill

Automatically formats code files using industry-standard tools.

Capabilities

  • Format JavaScript/TypeScript with Prettier
  • Fix ESLint issues automatically
  • Format JSON, YAML, and Markdown files
  • Run format checks before commits

Usage Examples

Format a single file:

"Format the src/index.js file"

Format entire directory:

"Format all files in the src/ directory"

Check formatting without changes:

"Check if files in src/ are properly formatted"

Configuration

Set these environment variables for custom configuration:

  • PRETTIER_CONFIG: Path to prettier config (default: .prettierrc)
  • ESLINT_CONFIG: Path to eslint config (default: .eslintrc.js)