VIEW005: invalid-position-key
position key not valid for the parent container
| Code | VIEW005 |
| Name | invalid-position-key |
| Category | View structure (VIEW) |
| Default severity | warning |
| Enabled by default | yes |
| Fix available | no |
| ign-lint equivalent | none |
What it does
Section titled “What it does”Reports a key of a component's position (or a propConfig entry
position.<key>) that the parent container does not use. Each container
type defines its children's position: x, y, width, height, rotate
in a coordinate container; grow, shrink, basis, align, display in
a flex container; size in a breakpoint container; tabIndex in a tab
container; height, breakpoints in a column container. Containers whose
child position is free-form (drawing, split, group) are not checked.
Why is this bad?
Section titled “Why is this bad?”The key has no effect. It is usually left over from moving the component
out of another container type by hand, and the layout the author expects
(x/y inside a flex container) does not happen.
Example
Section titled “Example”A child of an ia.container.flex:
"position": {"x": 10, "y": 20, "basis": "auto"}Use instead:
"position": {"basis": "auto"}Generated from the rule metadata by iglint generate-docs; iglint rule VIEW005 prints the same page in the terminal. Source: docs/rules/VIEW005.md.