Skip to content

vue/no-empty-component-block

禁止 <template> <script> <style> 块为空

  • 🔧 command line 上的 --fix 选项可以自动修复此规则报告的一些问题。

📖 规则详情

此规则禁止 <template> <script> <style> 块为空。

¥This rule disallows the <template> <script> <style> block to be empty.

此规则还检查具有属性 src 的块。参见 Vue 单文件组件 (SFC) 规范

¥This rule also checks block what has attribute src. See Vue Single-File Component (SFC) Spec.

Now loading...

🔧选项

¥🔧 Options

无。

¥Nothing.

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v7.0.0 中引入

¥This rule was introduced in eslint-plugin-vue v7.0.0

🔍代码实现

¥🔍 Implementation

eslint-plugin-vue v10.0 中文网 - 粤ICP备13048890号