VIEW014: param-without-direction
View parameter has no paramDirection
| Code | VIEW014 |
| Name | param-without-direction |
| 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 view parameter (params.<name>) without a valid
propConfig["params.<name>"].paramDirection (input, output or
inout). A parameter whose nested entries (params.<name>.<key>) carry a
direction counts as having one.
Why is this bad?
Section titled “Why is this bad?”The direction decides how the parameter is bound when the view is embedded
or opened as a popup: input flows into the view, output flows back to
the parent's binding, inout both. The Designer always writes it; a
parameter without one was added by hand or by a tool, and its behaviour in
embedding views is not what the parameter list in the Designer shows.
Example
Section titled “Example”"params": {"motorId": 0}Use instead:
"params": {"motorId": 0},"propConfig": {"params.motorId": {"paramDirection": "input", "persistent": true}}Generated from the rule metadata by iglint generate-docs; iglint rule VIEW014 prints the same page in the terminal. Source: docs/rules/VIEW014.md.