Skip to content

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

Reports a property change script (propConfig.<path>.onChange) with "enabled": false whose script is not empty.

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.

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