@mewjs/eslint-plugin-mini
v1.0.5
Published
eslint plugin for mini program
Downloads
31
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
JavasScript codejson
Includes app.json, component.json
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @mewjs/eslint-plugin-mini
:
npm install @mewjs/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": [
"@mewjs/mini"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@mewjs/mini/xml-indent": [2, 4]
}
}
Supported Rules
- @mewjs/mini/comment-directive
- @mewjs/mini/xml-indent
- @mewjs/mini/no-parsing-error
- @mewjs/mini/app-config-acceptable
- @mewjs/mini/sitemap-acceptable
- @mewjs/mini/no-duplicate-attributes
- @mewjs/mini/no-useless-mustache
- @mewjs/mini/component-nesting
- @mewjs/mini/not-empty
- @mewjs/mini/valid-for
- @mewjs/mini/valid-if
- @mewjs/mini/valid-elif
- @mewjs/mini/valid-else
- @mewjs/mini/no-confusing-for-if
- @mewjs/mini/valid-bind
- @mewjs/mini/no-static-inline-styles
- @mewjs/mini/component-attributes
- @mewjs/mini/max-attributes-per-line
- @mewjs/mini/html-end-tags
- @mewjs/mini/no-multi-spaces
- @mewjs/mini/html-closing-bracket-newline
- @mewjs/mini/html-closing-bracket-spacing
- @mewjs/mini/no-duplicate-else-if
- @mewjs/mini/no-restricted-static-attribute
- @mewjs/mini/singleline-html-element-content-newline
- @mewjs/mini/html-comment-content-newline
- @mewjs/mini/html-comment-content-spacing
- @mewjs/mini/array-bracket-spacing
- @mewjs/mini/arrow-spacing
- @mewjs/mini/camelcase
- @mewjs/mini/comma-dangle
- @mewjs/mini/dot-location
- @mewjs/mini/dot-notation
- @mewjs/mini/eqeqeq
- @mewjs/mini/func-call-spacing
- @mewjs/mini/key-spacing
- @mewjs/mini/keyword-spacing
- @mewjs/mini/mustache-interpolation-spacing
- @mewjs/mini/no-spaces-around-equal-signs-in-attribute
- @mewjs/mini/no-sparse-arrays
- @mewjs/mini/object-curly-newline
- @mewjs/mini/object-curly-spacing
- @mewjs/mini/space-in-parens
- @mewjs/mini/space-unary-ops
- @mewjs/mini/attribute-value-spacing
- @mewjs/mini/no-unknown-component-usage
- @mewjs/mini/no-useless-concat
- @mewjs/mini/space-infix-ops
- @mewjs/mini/resolve-src