This rule reports an anchor scope with an empty ref list, or with a ref listed
twice. An empty list sets no anchor-scope, and a repeated ref adds nothing.
Reported
style(style.anchorScope([]));ineffective-anchor-scope: anchor scope is empty; no scope declaration is emittedFixed
const trigger = style.ref("trigger");
style(style.anchorScope([trigger]));How to fix
Write the scope that you mean:
- List the refs whose anchor names this element limits, as in the example.
- Use
"all"to limit every anchor name. - Use
"none"to setanchor-scope: none.
See style.anchorScope().
Rule settings
| Preset | Severity |
|---|---|
recommended | warn |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.