在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用lint-fix
星标3
分支0
更新时间2026年4月25日 22:53
Fix linting errors systematically across the codebase
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Fix linting errors systematically across the codebase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate changelog entries following Keep a Changelog format
Generate a well-structured pull request with summary and test plan
Cluster related instincts into skills, commands, or agents
Export instincts for sharing with teammates or backup
Import instincts from teammates or community collections
View learned instincts grouped by domain with confidence levels
| name | lint-fix |
| description | Fix linting errors systematically across the codebase |
| user-invocable | true |
Fix linting errors systematically across the codebase.
/lint-fix # Fix all linting errors
/lint-fix src/ # Fix errors in specific directory
/lint-fix --check # Check without fixing (dry run)
Get overview of all issues:
# JavaScript/TypeScript
npm run lint
# or
npx eslint . --format=compact
# Python
ruff check .
# or
flake8 .
# Rust
cargo clippy
# Go
golangci-lint run
Group errors by type:
| Category | Priority | Auto-fixable |
|---|---|---|
| Syntax errors | Critical | No |
| Type errors | High | No |
| Formatting | Low | Yes |
| Best practices | Medium | Sometimes |
| Code style | Low | Yes |
Run auto-fix commands:
# ESLint
npx eslint . --fix
# Prettier
npx prettier --write .
# Python (ruff)
ruff check . --fix
ruff format .
# Python (black)
black .
# Rust
cargo fmt
cargo clippy --fix
# Go
gofmt -w .
golangci-lint run --fix
For errors that can't be auto-fixed:
## Manual Fixes Required
### Error 1: [Rule name]
**File**: src/components/Button.tsx:15
**Issue**: [Description]
**Fix**:
```typescript
// Before
const Button = (props) => ...
// After
const Button: React.FC<ButtonProps> = (props) => ...
...
### 5. Verify Fixes
After all fixes:
```bash
# Run lint again - should be clean
npm run lint
# Run tests to ensure fixes didn't break anything
npm test
# Run type check
npm run typecheck
| Rule | Issue | Fix |
|---|---|---|
no-unused-vars | Unused variable | Remove or use it |
prefer-const | let for never-reassigned | Change to const |
no-console | Console statement | Remove or disable rule |
@typescript-eslint/no-explicit-any | Using any | Add proper types |
| Rule | Issue | Fix |
|---|---|---|
| E501 | Line too long | Break line or disable |
| F401 | Unused import | Remove import |
| F841 | Unused variable | Remove or prefix with _ |
| E302 | Missing blank lines | Add blank lines |
| Rule | Issue | Fix |
|---|---|---|
needless_return | Explicit return | Remove return keyword |
clone_on_copy | Cloning Copy type | Remove .clone() |
redundant_closure | Unnecessary closure | Use function directly |
For large codebases:
## Lint Fix Plan
### Phase 1: Auto-fixable (Low risk)
- [ ] Run prettier/formatter
- [ ] Run eslint --fix
- [ ] Commit: "style: auto-fix formatting"
### Phase 2: Safe manual fixes
- [ ] Fix unused imports
- [ ] Fix unused variables
- [ ] Commit: "refactor: remove unused code"
### Phase 3: Type improvements
- [ ] Replace `any` with proper types
- [ ] Add missing type annotations
- [ ] Commit: "types: improve type safety"
### Phase 4: Logic fixes
- [ ] Fix potential bugs (eslint warnings)
- [ ] Address security concerns
- [ ] Commit: "fix: address lint warnings"
When a rule shouldn't apply:
// Single line
// eslint-disable-next-line no-console
console.log('debug');
// Block
/* eslint-disable no-console */
console.log('start');
console.log('end');
/* eslint-enable no-console */
// File level (at top)
/* eslint-disable no-console */
# Ruff / Flake8
x = 1 # noqa: F841