eslint-plugin-ant
v0.9.9
Published
eslint rules for ant
Downloads
15
Maintainers
Readme
eslint-plugin-ant
eslint configuration for ant
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-ant
:
$ npm install eslint-plugin-ant --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-ant
globally.
Usage
Add ant
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"ant"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"ant/cdn-res": "error"
}
}
Supported Rules
- cdn-res 静态资源必须是cdn链接地址/static hyperlink must be cdn link 文档
- jquery-type-var jquery类型的对象的变量需要带上$已区别其他变量/must jquery-type variable($xxx) if jquery func assign 文档
- no-deprecated-jsapi 禁止使用已经废弃的jsapi接口/no deprecated jsapi 文档
- no-encode-char 禁止含有url编码字符/no contain uri-encode char 文档
- no-html-entity-spaces 禁止含有nbsp;编码/no contain nbsp; char 文档
- no-http 禁止含有http地址/no http hyperlink 文档
- no-none-semantic-var 变量的语义性不清/no ambiguous variable 文档
- no-pushwindow-schema 禁止pushwindow里url是schema协议/no pushwindow schema 文档