Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 2.43 KB

File metadata and controls

66 lines (54 loc) · 2.43 KB
warning This is a dynamically generated file. Do not edit manually.
layout default
title import-path-check | Solhint

import-path-check

Recommended Badge Category Badge Default Severity Badge warn

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

Description

Check if an import file exits in target path

Options

This rule accepts an array of options:

Index Description Default Value
0 Rule severity. Must be one of "error", "warn", "off". warn

Example Config

{
  "rules": {
    "import-path-check": ["warn",["[~dependenciesPath]"]]
  }
}

Notes

  • Rule checks relative and absolute path first. Then checks for each dependency path in config file

  • searchOn: an array of paths to check in specified order

  • If searchOn is empty only DEFAULT_LOCATIONS are used.

  • If 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
    • /usr/local/lib/node_modules
    • /home/[~user]/.nvm/versions/node/[~node-version]/lib/node_modules
    • /home/[~user]/.yarn/global/node_modules
    • /npm/node_modules (for Windows)
    • /Yarn/Data/global/node_modules (for Windows)
  • WINDOWS OS file structure has not been thoroughly tested.

Examples

This rule does not have examples.

Version

This rule was introduced in the latest version.

Resources