The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Check Immutable variables. Capitalized SNAKE_CASE or mixedCase depending on configuration.
This rule accepts an array of options:
| Index | Description | Default Value |
|---|---|---|
| 0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
| 1 | A JSON object with a single property “immutablesAsConstants” as boolean specifying if immutable variables should be treated as constants | {“immutablesAsConstants”:true} |
{
"rules": {
"immutable-vars-naming": [
"warn",
{
"immutablesAsConstants": true
}
]
}
}
This rule does not have examples.
This rule was introduced in Solhint 3.5.1