VIEW009: disabled-change-script
Property change script is disabled but has code
| Code | VIEW009 |
| Name | disabled-change-script |
| Category | View structure (VIEW) |
| Default severity | info |
| Enabled by default | yes |
| Fix available | no |
| ign-lint equivalent | none |
What it does
Section titled “What it does”Reports a property change script (propConfig.<path>.onChange) with
"enabled": false whose script is not empty.
Why is this bad?
Section titled “Why is this bad?”A disabled change script never runs. Its code is dead, is not maintained along with the rest of the view, and confuses readers who expect it to run when the property changes. Delete it, or enable it if it should run.
Example
Section titled “Example”"custom.speed": {"onChange": {"enabled": false, "script": "\tself.refresh()"}}Use instead:
"custom.speed": {"onChange": {"enabled": true, "script": "\tself.refresh()"}}Generated from the rule metadata by iglint generate-docs; iglint rule VIEW009 prints the same page in the terminal. Source: docs/rules/VIEW009.md.