The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Check if an import file exits in target path
This rule accepts an array of options:
| Index | Description | Default Value |
|---|---|---|
| 0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
| 1 | Array of allowed base path patterns for imports. | read DEFAULT_LOCATIONS |
{
"rules": {
"import-path-check": [
"warn",
[
"[~dependenciesPath]"
]
]
}
}
searchOn: an array of paths to check in specified ordersearchOn is empty only DEFAULT_LOCATIONS are used.searchOn has value, will be concatenated with DEFAULT_LOCATIONS.If config has extends:recommended or all and rule is overwritten with searchOn, values are concatenated with DEFAULT_LOCATIONS.
Default Locations:
~current-project]~current-project]/contracts~current-project]/src~current-project]/node_modules~current-project]/artifacts~current-project]/cache~current-project]/lib~current-project]/out~user]/.nvm/versions/node/[~node-version]/lib/node_modules~user]/.yarn/global/node_modulesThis rule does not have examples.
This rule was introduced in Solhint 5.1.0