0.1.1 • Published 5 years ago

eslint-plugin-state v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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"
    }
}
0.1.1

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago