solhint

immutable-vars-naming

Recommended Badge Category Badge Default Severity Badge warn

The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.

Description

Check Immutable variables. Capitalized SNAKE_CASE or mixedCase depending on configuration.

Options

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}

Example Config

{
  "rules": {
    "immutable-vars-naming": ["warn",{"immutablesAsConstants":true}]
  }
}

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 3.5.1

Resources