Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 944 Bytes

README.md

File metadata and controls

52 lines (31 loc) · 944 Bytes

eslint-plugin-require-call

ESLint plugin to help you remove the relative (../) and local (./) path clutter with require function call and import statements

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-require-call:

$ npm install eslint-plugin-require-call --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-module-requires globally.

Usage

Add module-requires to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "require-call"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "require-call/rule-name": 2
    }
}

Supported Rules