ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / disallow-import
Disallows import given sources.
module.exports = {
plugins: ["misc"],
rules: {
"misc/disallow-import": [
"error",
{
allow: string | string[],
disallow: string | string[]
}
]
}
};
| Option | Description | Default | | :—– | :———- | :—— |
allow |
Allowed sources (minimatch) | [] |
disallow |
Disallowed sources (minimatch) | [] |
/*
eslint misc/disallow-import: [
error,
{
disallow: "source1"
}
]
*/
import * as source1 from "source1";
/*
eslint misc/disallow-import: [
error,
{
disallow: "source1"
}
]
*/
import * as source2 from "source2";