The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Imported object name is not being used by the contract.
This rule accepts a string option of rule severity. Must be one of “error”, “warn”, “off”. Default to warn.
{
"rules": {
"no-unused-import": "warn"
}
}
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {}
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract B {}
This rule was introduced in Solhint 3.5.1