wzhudev / eslint-plugin-no-barrel-import

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
    }
}

About


Languages

Language:JavaScript 100.0%