eslint-plugin-mini
v0.0.5
Published
eslint plugin for mini program
Downloads
7
Maintainers
Readme
eslint-plugin-mini
eslint plugin for mini program.
support codes:
wxml
Wechat mini program tplwxs
Wechat mini program wxs moduleaxml
Alipay tplswan
Baidu smart program tpljs
JavasSript codejson
Includes app.json, component.json
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-mini
:
$ npm install eslint-plugin-mini --save-dev
Usage
Add mini
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"mini"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"mini/xml-indent": [2, 4]
}
}
Supported Rules
- mini/comment-directive
- mini/xml-indent
- mini/no-parsing-error
- mini/app-config-acceptable
- mini/sitemap-acceptable
- mini/no-duplicate-attributes
- mini/no-useless-mustache
- mini/component-nesting
- mini/not-empty
- mini/valid-for
- mini/valid-if
- mini/valid-elif
- mini/valid-else
- mini/no-confusing-for-if
- mini/valid-bind
- mini/no-static-inline-styles
- mini/component-attributes
- mini/max-attributes-per-line
- mini/html-end-tags
- mini/no-multi-spaces
- mini/html-closing-bracket-newline
- mini/html-closing-bracket-spacing
- mini/no-duplicate-else-if
- mini/no-restricted-static-attribute
- mini/singleline-html-element-content-newline
- mini/html-comment-content-newline
- mini/html-comment-content-spacing
- mini/array-bracket-spacing
- mini/arrow-spacing
- mini/camelcase
- mini/comma-dangle
- mini/dot-location
- mini/dot-notation
- mini/eqeqeq
- mini/func-call-spacing
- mini/key-spacing
- mini/keyword-spacing
- mini/mustache-interpolation-spacing
- mini/no-spaces-around-equal-signs-in-attribute
- mini/no-sparse-arrays
- mini/object-curly-newline
- mini/object-curly-spacing
- mini/space-in-parens
- mini/space-unary-ops
- mini/attribute-value-spacing
- mini/no-unknown-component-usage
- mini/no-useless-concat
- mini/space-infix-ops
- mini/resolve-src