0.0.1 • Published 1 year ago

@bidiao/eslint-plugin-vue3 v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@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

NameOptionsDescription
@bidiao/vue3/prettiertemplate: 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"
  }
}
0.0.1

1 year ago