eslint-plugin-recommend-import

1.0.0 • Public • Published

eslint-plugin-recommend-import

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-recommend-import:

$ npm install eslint-plugin-recommend-import --save-dev

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

How to use

{
  "plugins": [
    "recommend-import"
  ],
  "rules": {
    "recommend-import/no-import-lib": 2
  }
}

Rule Details

This rule aims to ensure that the current import module which provides module field in the package.json

Examples of incorrect code for this rule:

import browserHistory from 'react-router/lib/browserHistory';
import combineReducer from 'redux/lib/combineReducer';

Examples of correct code for this rule:

import { browserHistory } from 'react-router';
import { combineReducer } from 'redux/lib/combineReducer';

Package Sidebar

Install

npm i eslint-plugin-recommend-import

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

56.8 kB

Total Files

7

Last publish

Collaborators

  • mrkou47