The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Enforces the use of ONE Contract per file see here
This rule accepts a string option of rule severity. Must be one of “error”, “warn”, “off”. Default to warn.
{
"rules": {
"one-contract-per-file": "warn"
}
}
contract Foo {
}
contract Foo {
}
contract Bar {
}
contract Foo {
}
Library ReusableThing {
}
This rule was introduced in Solhint 3.7.0-rc02