Official ESLint plugin for San
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-san
:
$ npm install eslint-plugin-san --save-dev
Add san
to the plugins section of your .eslintrc
configuration file.
{
"extends": ["plugin:san/essential"],
"parserOptions": {
"parser": "babel-eslint"
}
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"san/rule-name": 2
}
}
On VS Code using ESlint extension to support.
By default, Eslint extension is NOT support San, you shoud config eslint.validate
option like this in settings.json
:
{
"eslint.validate": [
"san"
]
}
- Fill in provided rules here