@bidiao/eslint-plugin-vue3
v0.0.1
Published
```bash npm install --save-dev @bidiao/eslint-plugin-vue3 ```
Downloads
4
Readme
@bidiao/eslint-plugin-vue3
Installation
npm install --save-dev @bidiao/eslint-plugin-vue3
Usage
Add @bidiao/vue3
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@bidiao/vue3"]
}
Rules
| Name | Options | Description |
| ----------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| @bidiao/vue3/prettier
| template: false, script: true, style: true, | 通过eslint 使用 prettier 规则对vue 进行格式化,options 为启用prettier进行格式化的选项,eslint在处理vue3 时,默认是不含针对style内容的格式化 |
| @bidiao/vue3/use-scoped-or-module
| | 针对vue 文件中的style 检测未使用 scoped 或 module 标识,不加容易出现样式错乱问题 |
示例
{
"plugins": ["@bidiao/vue3"],
"rules": {
"@bidiao/vue3/prettier": [
"warn",
{
"template": false,
"script": true,
"style": true
}
],
"@bidiao/vue3/use-scoped-or-module": "error"
}
}