Skip to main content

FrontendReferencedFields

Struct FrontendReferencedFields 

Source
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: String

Regex pattern for the symbol name.

§location: String

Where 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.

Trait Implementations§

Source§

impl Debug for FrontendReferencedFields

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FrontendReferencedFields

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<FrontendReferencedFields, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for FrontendReferencedFields

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.