eslint-plugin-import-path-plus
v0.0.14
Published
import path rules
Downloads
20
Maintainers
Readme
eslint-plugin-import-path-plus
import path rules
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-import-path-plus
:
npm install eslint-plugin-import-path-plus --save-dev
Usage
Add import-path-plus
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["import-path-plus"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"import-path-plus/no-internal-modules": [
"error",
{
target: "**/.umi/**",
replace: "umi"
},
{
target: "umi",
replace: "@/utils/router",
modules: ["Link", "useHistory"]
}
]
}
}
Supported Rules
- no-internal-modules