0.6.1 • Published 4 years ago

eslint-plugin-zxlint v0.6.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

eslint-plugin-zxlint

not import and require some modules

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-zxlint: 先安装esLint

$ npm install eslint-plugin-zxlint --save-dev

Usage

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

{
    "plugins": [
        "zxlint"
    ]
}

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

{
    "rules": {
        "zxlint/rule-name": 2
    }
}
{
    "rules": {
        "zxlint/no-import": ['error',{'files':['a.js','b.js'],'modules':['fs','http','events','os']}]
    }
}
files receive a Array, modules too    
a.js,b.js can import fs http events os modules, others can not

Supported Rules

  • Fill in provided rules here