Repository navigation
fix(core): accept a11y/* rule ids in inline suppression directives - #499
Conversation
The directive parser's rule-id pattern allowed only letters in the category segment, so every a11y/* directive was silently ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR updates directive parsing to accept rule IDs with digits in category names. It adds unit coverage and a kitchen-sink end-to-end suite for CLI, configuration, inline directive, and suppression-file behavior. ChangesDirective suppression
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This narrowly fixes inline suppression of a11y rule IDs with regression coverage; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
--ignore, --rules, --category, --fail-on/--min-health, config rules 'off', severity override, route overrides, the inline directive (including a11y/* ids), and the suppressions file each run against a scratch copy of the example; the inline-directive case fails without the RULE_ID_RE fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
svelte-vitals-disable-next-line a11y/<rule>was silently ignored: the directive parser's rule-id pattern (RULE_ID_REinpackages/core/src/component-parse.ts) allowed only letters in the category segment, so the digit ina11ymade the whole directive fail to match and the finding stayed. Every other category is all-letters, which is why this only surfaced with the a11y category.Found by probing every disable/suppress surface (
--ignore,--rules,--category,--fail-on/--min-health, configrules: 'off', severity override, routeoverrides, the suppressions file, and the inline directive) against the kitchen-sink example — the other eight all worked; this one didn't.[a-z][a-z0-9]*); regression test for a lone and a comma-listeda11y/*directive.examples/kitchen-sink/test/e2e-suppression.test.tspins all nine surfaces against the real gallery (scratch copies, gallery untouched), so a surface that silently stops working fails in this repo's CI rather than a user's. Tamper-verified: with the fix reverted, exactly the inline-directive case fails (1/8), the other seven pass.@svelte-vitals/corepatch.Test plan
pnpm testgreen (core 1518 / cli 1212 / vite 250 / kitchen-sink 16),pnpm lintclean.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
Documentation