Fix violations of an eslintPluginScraps rule across the codebase. Use when asked to "fix lint violations", "apply a lint rule", "fix scraps rule errors", "roll out a lint rule", "enforce a rule codebase-wide", or "fix design system lint". Covers manual fixes, autofix, batching, and codemod strategies for large-scale rollouts.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
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 -5The 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 -5Should report 0 problems.
b4b3565
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.