`noUnknownTypeSelector` reports custom view-transition names in `::view-transition-*()`
Environment information
CLI:
Version: 2.5.14
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_DISTRIBUTION: npm
JS_RUNTIME_NAME: nodeRule name
correctness/noUnknownTypeSelector
Playground link
/* reported: custom names that do not look like elements */
::view-transition-new(page) {
opacity: 0;
}
::view-transition-group(sidebar) {
animation: none;
}
::view-transition-old(Page) {
opacity: 0;
}
/* not reported */
::view-transition-old(root) {
opacity: 0;
}
::view-transition-group(div) {
animation: none;
}
::view-transition-group(hero-image) {
animation: none;
}
::view-transition-image-pair(*) {
isolation: auto;
}
::view-transition-group(.card) {
animation: none;
}page and sidebar are reported as unknown type selectors (an error under the recommended preset). The argument of ::view-transition-group(), ::view-transition-image-pair(), ::view-transition-old() and ::view-transition-new() is a <pt-name-selector>: * or a <custom-ident> naming a view-transition-name, not a type selector (CSS View Transitions 1).
Whether a name is reported depends on whether it looks like an element: root, div and hyphenated names such as hero-image (which pass as custom elements) are accepted, while page, sidebar and Page are reported. The Level 2 class form (.card) is already accepted. #5998 fixed the same argument for noUnknownPseudoElement.
Reproduced with the 2.5.14 CLI and in the playground (8cc46d8).
Expected result
No diagnostic for identifiers inside the arguments of the ::view-transition-*() pseudo-elements.
Code of Conduct
- I agree to follow Biome's Code of Conduct
Tool Use Disclaimer: Claude Code using Anthropic Opus 5.5 helped build the reproduction.
Source: biomejs/biome