A plugin to disallow cross-importing of modules matching a defined list of paths unless with a 'domain';
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-disallow-cross-domain-imports
:
npm install eslint-plugin-disallow-cross-domain-imports --save-dev
Add disallow-cross-domain-imports
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"disallow-cross-domain-imports"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"disallow-cross-domain-imports/no-cross-imports": 2
}
}
- Fill in provided rules here
'''sh npm i -g generator-eslint npx yo eslint:plugin npm uninstall -g generator-eslint '''