eslint-config
Dushenyan ESLint config presets
Install
pnpm add eslint -D
pnpm add @dushenyan/eslint-config -D
Config .eslintrc
{
"extends":"@dushenyan"
}
config settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Used Rules
The following configuration has been used and will be fixed automatically
Base Config
used rules |
explain |
prefer-arrow-callback |
回调使用箭头函数 |
Typescript Config
used rules |
explain |
semi |
禁止不必要的分号 |
Vue Config
used rules |
explain |
no-setup-props-destructure |
(off)setup可以解构 |
multi-word-component-names |
(off) 组价名可以简短 |
html-indent |
template 缩进两列 |