pub struct FrontendReferencedFields {
pub pattern: String,
pub location: String,
pub component: Option<String>,
pub parent: Option<String>,
pub not_parent: Option<String>,
pub parent_from: Option<String>,
pub child: Option<String>,
pub not_child: Option<String>,
pub requires_child: Option<String>,
pub value: Option<String>,
pub from: Option<String>,
pub file_pattern: Option<String>,
}Expand description
Fields for a frontend.referenced condition.
This condition requires a frontend-analyzer-provider gRPC server. It performs AST-level symbol matching with location discriminators.
Fields§
§pattern: StringRegex pattern for the symbol name.
location: StringWhere to look: IMPORT, JSX_COMPONENT, JSX_PROP, FUNCTION_CALL, TYPE_REFERENCE.
component: Option<String>Filter JSX props to only those on this component (regex).
parent: Option<String>Filter JSX components to only those inside this parent (regex).
not_parent: Option<String>Negative parent filter: only match when parent does NOT match this pattern. Used for conformance rules (e.g., “ModalHeader must be inside Modal”).
parent_from: Option<String>Filter by the parent component’s import source (regex).
child: Option<String>Positive child filter: only match the component (via pattern) if it
has at least one direct JSX child whose name matches this regex. The
incident is emitted on the parent component. Used for migration rules
to detect old-style children still present (e.g., child: ^ModalBox$
fires on <Modal> only when it still contains old internal components).
not_child: Option<String>Negative child filter: match the parent component (via pattern) and
emit incidents for each direct JSX child whose name does NOT match this
pattern. Used for “exclusive wrapper” rules (e.g., “all children of
InputGroup must be InputGroupItem or InputGroupText”).
requires_child: Option<String>Negative-existence child filter: match the component (via pattern)
and emit an incident if NONE of its direct JSX children match this
regex. Used for conformance rules like “AlertGroup must contain Alert.”
Inverse of child (which gates on existence). Complementary to
notChild (which fires per non-matching child).
value: Option<String>Filter JSX prop values to only those matching this regex.
from: Option<String>Scope to imports from a specific package (e.g., @patternfly/react-tokens).
file_pattern: Option<String>File path regex filter. Only scan files whose path matches this pattern.
e.g., ".*\\.(test|spec)\\.(ts|tsx|js|jsx)$" to scope to test files.