https://github.com/mrkou47/eslint-plugin-recommend-import
  
  
    strict import esModule code style in your project 
    https://github.com/mrkou47/eslint-plugin-recommend-import
  
        Last synced: 2 months ago 
        JSON representation
    
strict import esModule code style in your project
- Host: GitHub
- URL: https://github.com/mrkou47/eslint-plugin-recommend-import
- Owner: MrKou47
- Created: 2018-05-23T10:52:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-24T09:05:00.000Z (almost 4 years ago)
- Last Synced: 2025-03-24T18:19:19.713Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
- 
            Metadata Files:
            - Readme: README.md
 
Awesome Lists containing this project
README
          # eslint-plugin-recommend-import
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ 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
```js
{
  "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:
```js
import browserHistory from 'react-router/lib/browserHistory';
import combineReducer from 'redux/lib/combineReducer';
```
Examples of **correct** code for this rule:
```js
import { browserHistory } from 'react-router';
import { combineReducer } from 'redux/lib/combineReducer';
```