eslint-plugin-no-barrel-import
v0.0.2
Published
Forbid import from barrels
Downloads
3,859
Maintainers
Readme
eslint-plugin-no-barrel-import
Forbid importing from barrel index.ts files.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-no-barrel-import
:
npm install eslint-plugin-no-barrel-import --save-dev
Usage
Add no-barrel-import
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"no-barrel-import"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"no-barrel-import/rule-name": 2
}
}