The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Forbid or enforce explicit types (like uint256) that have an alias (like uint).
This rule accepts an array of options:
Index | Description | Default Value |
---|---|---|
0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
1 | Options need to be one of “explicit”, “implicit” | explicit |
{
"rules": {
"explicit-types": ["warn","explicit"]
}
}
--fix
optionuint256 public variableName
uint public variableName
uint256 public variableName = uint256(5)
uint public variableName
uint256 public variableName
uint public variableName = uint256(5)
This rule was introduced in Solhint 3.5.1