no-unused-vars

August 21, 2025 ยท View on GitHub

Recommended Badge Category Badge Default Severity Badge warn

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

Description

Variable "name" is unused.

Options

This rule accepts an array of options:

IndexDescriptionDefault Value
0Rule severity. Must be one of "error", "warn", "off".warn
1A JSON object with a single property "validateParameters" as boolean specifying whether to report unused parameters from functions and modifiers.{"validateParameters":true}

Example Config

{
  "rules": {
    "no-unused-vars": [
      "warn",
      {
        "validateParameters": true
      }
    ]
  }
}

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 5.0.4

Resources