.agents/skills/lint-fix/SKILL.md
Fix violations of rule $0 on files matching $1.
$0 — Rule name (e.g., use-semantic-token, no-core-import)$1 — File or glob pattern (e.g., static/app/components/, static/app/views/alerts/)Before fixing violations, know what the fix looks like. Load references/fix-patterns.md for per-rule fix details:
| Rule | Has autofix? | Fix reference |
|---|---|---|
no-core-import | Yes | fix-patterns.md §no-core-import |
no-token-import | No | fix-patterns.md §no-token-import |
use-semantic-token | No | fix-patterns.md + token-taxonomy.md |
restrict-jsx-slot-children | No | fix-patterns.md §restrict-jsx-slot-children |
For use-semantic-token violations, you MUST load references/token-taxonomy.md to know which token category to use for each CSS property.
Count violations before choosing a strategy:
pnpm exec eslint --rule '@sentry/scraps/$0: error' "$1" 2>&1 | tail -5
The last line shows the count (e.g., "42 problems (42 errors, 0 warnings)").
Tip: Running eslint on all of static/app/ can take 2+ minutes. Narrow scope to a subdirectory first.
pnpm exec eslint --fix --rule '@sentry/scraps/$0: error' "$1"
Always review the diff after --fix before committing. If the rule is partially auto-fixable, run --fix first, then manually fix remaining violations.
static/app/views/, static/app/components/)@typescript-eslint/typescript-estree--fix usually handles these at any scalewarn first, fix in batches across multiple PRspnpm exec eslint --rule '@sentry/scraps/$0: error' "$1"fix(lint): enforce @sentry/scraps/$0 for <codeowner>eslint.config.ts, fix all violations first, then enable the rule in a follow-up PR.venv/bin/prek run -q --files <file1> [file2 ...]
After all fixes:
pnpm exec eslint --rule '@sentry/scraps/$0: error' static/app/ 2>&1 | tail -5
Should report 0 problems.