AgentSkillsCN

lint

项目专用静态检查和类型检查命令。针对您的项目进行定制。

SKILL.md
--- frontmatter
name: lint
description: Project-specific linting and type-checking commands. Customize for your project.
allowed-tools: Bash

Lint Skill (Project-Specific)

CUSTOMIZE THIS FILE FOR YOUR PROJECT.

Quick Reference

bash
# TypeScript (bun + biome/eslint)
bunx biome check .
bunx eslint .
bunx tsc --noEmit

# Python (uv + ruff/mypy)
uv run ruff check .
uv run ruff format --check .
uv run mypy src/

Lint Commands

TypeScript/JavaScript

bash
# Biome (recommended - fast)
bunx biome check .              # Lint + format check
bunx biome check --apply .      # Auto-fix

# ESLint
bunx eslint .
bunx eslint . --fix

# TypeScript type-check
bunx tsc --noEmit

Python

bash
# Ruff (recommended - fast)
uv run ruff check .             # Lint
uv run ruff check --fix .       # Auto-fix
uv run ruff format --check .    # Format check
uv run ruff format .            # Auto-format

# Mypy type-check
uv run mypy src/
uv run mypy src/ --strict

Expected Output

Lint/typecheck should exit with:

  • Exit code 0 = No issues
  • Exit code 1 = Issues found

Integration with Self-Test

After implementing code:

code
1. Run lint: bunx biome check . (or uv run ruff check .)
2. If issues → fix them
3. Run typecheck: bunx tsc --noEmit (or uv run mypy src/)
4. If type errors → fix them
5. Continue to tests

Common Issues

IssueFix
Unused importRemove it or add // biome-ignore
Type mismatchFix the type or add explicit annotation
FormattingRun auto-format command