You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rule_options ignore: support selectors in [[ignore]] entries (#1262 follow-up) #1440
[[ignore]] (#1262) waives findings by items and urls. The selectors field is reserved: squirrel config validate refuses it, because most rules do not yet say where in the page an item sits. Criterion 13 of #1262 ("selector ignores are tracked in a follow-up issue") is this issue.
Use case from the original request: a platform renders a country <select> whose option text does not match its aria-label; the merchant cannot change it and wants that one element waived while the same rule keeps reporting their own selects.
[[ignore]]
rule = "a11y/label-content-name-mismatch"selectors = ["localization-form select"]
reason = "rendered by the platform"
Acceptance Criteria
Rules that report a DOM element (the a11y label, form and landmark rules first) put a selector for it on the item, so it can be matched; the field is documented for rule authors.
selectors is accepted in an [[ignore]] entry (with rule) and squirrel config validate no longer refuses it; an entry with selectors but none of items, urls or a rule that reports selectors is rejected with a message naming the rule.
An item whose selector matches a selectors entry (the same CSS selector forms the page can be queried with, matched against the element's ancestry) is waived exactly like an items match: the check is built from the remaining items, counted as waived, and listed in meta.ignored with its reason.
A test with two country-select-shaped elements on one page, one inside localization-form and one outside: only the first is waived and the second is still reported.
A selector that matches nothing is listed as unmatched in the report, like an unmatched items entry.
--no-ignore shows the unwaived result; with no selectors entries the output is byte-identical to today.
docs/configuration/ignore.mdx drops "Reserved" and make validate passes in docs/; the agent skill change is filed as a skills issue if the config reference changes.
Activity
feat(rules): [[ignore]] selectors over the element path a rule report…
feat(rules): [[ignore]] selectors over the element path a rule report…
feat(rules): [[ignore]] selectors over the element path a rule report…
feat(rules): [[ignore]] selectors over the element path a rule report…
nc9 commentedon Nov 1, 2026
Shipped in v0.0.155 (
ab4c091b), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.155nik