eslint-plugin-wm-eslint
v0.0.0
Published
wm eslint tools
Downloads
5
Maintainers
Readme
eslint-plugin-wm-eslint
wm eslint tools
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-wm-eslint
:
npm install eslint-plugin-wm-eslint --save-dev
Usage
Add wm-eslint
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"wm-eslint"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"wm-eslint/rule-name": 2
}
}
Rules
TODO: Run eslint-doc-generator to generate the rules list.
文档
AST——抽象语法树
- astexplorer.net
- 工具网站:它能查看代码被解析成AST的样子
- 将代码解析成AST
ESLint使用JavaScript解析器 Espree 把JS代码解析成AST。