0.0.3 • Published 2 years ago
@swanide/eslint-plugin-swan v0.0.3
@swanide/eslint-plugin-swan
eslint plugin for swan program.
support codes:
swanBaidu smart program tpl languagesjsJavasSript code
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install @swanide/eslint-plugin-swan:
$ npm install @swanide/eslint-plugin-swan --save-devBin
Install @swanide/eslint-plugin-swan global.
$ npm install eslint @swanide/eslint-plugin-swan -gUse swan-lint to lint mini program project.
$ swan-lint .Use different lint level.
$ SWAN_LINT_CONFIG=[base|recommended|strict] swan-lint .basebasic lint rules, must be fixedrecommendedrecommended lint rulesstrictstrict lint rules
Usage
Add swan to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"@swanide/swan"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"@swanide/swan/valid-bind": 2
}
}Supported Rules
0.0.3
2 years ago