pub struct DuplicatePropShape {
pub file: PathBuf,
pub line: u32,
pub component: String,
pub shape: Vec<String>,
pub group_size: u32,
pub sharing_components: Vec<DuplicatePropShapeMember>,
}Expand description
A React/Preact component that participates in a duplicate-prop-shape GROUP:
three or more distinct components across two or more files whose
statically-harvested, fully-known prop NAME set is byte-for-byte IDENTICAL
after excluding a fixed denylist of ubiquitous DOM / render-passthrough prop
names, with the REMAINING significant set holding four or more members. This
is a structural-refactor health signal (extract a shared Props type or a
base component), never a correctness error and never an auto-fix. One finding
is emitted per participating component; sharing_components lists the other
members of the same group. Health signal: the rule defaults to off
(opt-in), so this is dormant until enabled. Exact full-set identity only: a
superset / subset relationship does NOT group (so the finding always fits one
extracted shared type).
Fields§
§file: PathBufThe file containing this component.
line: u321-based line of this component definition (the finding anchor for jump-to-source and line-level suppression).
component: StringThis component name.
shape: Vec<String>The shared SIGNIFICANT prop-name set (sorted, denylist-stripped). The unit being grouped; identical across every member of the group.
group_size: u32The total number of components in this group (this one plus every sibling).
sharing_components: Vec<DuplicatePropShapeMember>The OTHER components sharing this exact prop shape (path-sorted). A file-level-suppressed member drops from its own finding but still appears here, because the group is real regardless of suppression.