eslint-plugin-state

0.1.1 • Public • Published

eslint-plugin-state

if you not add comments for react state variate or vue data variate, it will show error

如果你没有给 react state变量 或者 vue data变量 添加注释,那么 eslint 会提示一个错误,培养为变量写注释的好习惯

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-state:

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

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

Usage

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

{
    "plugins": [
        "state"
    ]
}

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

react state

{
    "rules": {
        "state/no-state-comment-line": "error"
    }
}

vue data

{
    "rules": {
        "state/no-data-comment-line": "error"
    }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.10
0.0.70
0.0.60
0.0.50
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i eslint-plugin-state

Weekly Downloads

0

Version

0.1.1

License

ISC

Unpacked Size

13.1 kB

Total Files

12

Last publish

Collaborators

  • jackfei