跳到主要内容
知仓学习社ZHICANG

code-linting

Run Python (ruff) and JavaScript (Biome) linting.

不碰外部(只输出文字)无严重或高危命中notque/vexjoy-agent

它会碰到什么

扫了多少3 个文本文件,24 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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 ruff or pipx 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 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 419
本站分层T2
该仓技能数122
原文件路径skills/code-quality/code-linting/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 122 个技能