eslint-plugin-wpg
v1.1.1
Published
eslint plugin for wpg
Downloads
5
Maintainers
Readme
eslint-plugin-wpg
a eslint plugin for wpg
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-wpg
:
npm install eslint-plugin-wpg --save-dev
Usage
Add wpg
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["wpg"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"wpg/rule-name": 2
}
}
Rules
| Name | Description | | :--------------------------------------------- | :--------------------------------------------------------------- | | router-replace | 如果该项目需要对接小门户,那么不应该直接使用$router,而应该使用封装的方法,比如$open、goto等等,具体视项目而定。 |