code-linting
Run Python (ruff) and JavaScript (Biome) linting.
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Code linting
Check or fix Python with Ruff and JavaScript/TypeScript with Biome. Use repository commands and configuration before these defaults. Read project instructions, pyproject.toml, and biome.json; preserve configured rules and line width.
Check and fix
Use the project virtual environment (./venv/bin/ruff or ./env/bin/ruff) and installed JavaScript tooling. For mixed projects, check both languages unless the task selects one. Adapt src/ to the actual source directory.
| Task | Python | JavaScript/TypeScript |
|---|---|---|
| Check | ruff check . | npx @biomejs/biome check src/ |
| Format check | ruff format --check . | Included in Biome check |
| Fix lint | ruff check --fix . | npx @biomejs/biome check --write src/ |
| Format | ruff format . | npx @biomejs/biome format --write src/ |
If configured, use make lint or make lint-fix. Check first; apply fixes only within the requested work. Review git diff, undo incorrect fixes, then rerun lint and format checks. Do not change rules, install new tooling, or expand cleanup scope merely to get a pass.
For remaining issues: F401 means remove or use the import; I001 needs import sorting; E501 needs shorter lines within existing settings. Biome noVar uses let/const, useConst marks unchanged bindings, and noDoubleEquals uses strict equality where semantics allow.
Report commands, exit status, and actionable rule/file:line diagnostics. Keep full logs available; summarize passing checks. Remove only temporary files created for this run, preserving useful failure logs.
Recovery and optional modes
- Ruff missing: check the project virtual environment. Installation options are
pip install rufforpipx run ruff check .; install only within authorized dependency work. - Biome missing: check package dependencies before npx execution; do not let a read-only check download tooling unexpectedly.
- Config missing: verify project root before running defaults.
- Strict warnings, format-only, or rule exceptions: use only when requested; do not weaken repository requirements.
Reference loading table
| Signal | Reference |
|---|---|
| Ruff rules, configuration, versions, or F401/E711/B006/UP errors | references/ruff-rules-reference.md |
| Biome rules, configuration, ESLint migration, or noVar/useConst/noDoubleEquals | references/biome-rules-reference.md |
| Lint versus format CI failure | Relevant tool reference above |
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。