自定义规则-中科时代
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-sinsegyerules
:
npm install eslint-plugin-sinsegyerules --save-dev
Add sinsegyerules
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["sinsegyerules"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"sinsegyerules/rule-name": 2
}
}
TODO: Run eslint-doc-generator to generate the configs list (or delete this section if no configs are offered).
TODO: Run eslint-doc-generator to generate the rules list.
ide
'sinsegye-rules/function': 'error',
'sinsegye-rules/theiatype': 'error',
'sinsegye-rules/let': 'error',
'sinsegye-rules/classtype': 'error',
'sinsegye-rules/classname': 'error',
web 'sinsegye-rules/function': 'error', 'sinsegye-rules/constants': 'error', 'sinsegye-rules/let': 'error', 'sinsegye-rules/classtype': 'error', 'sinsegye-rules/classname': 'error',