vue/no-content-outside-block
disallow content outside of the top-level blocks
- 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
This rule reports text content that is placed outside of the top-level blocks of a Single-File Component.
The Vue compiler only processes the top-level blocks (<template>, <script>, <style> and custom blocks) and silently drops everything between them. Code written outside of a block never runs and text written outside of a block is never rendered, so such content is almost always a leftover or a mistake.
HTML comments (<!-- ... -->) and custom blocks (such as <docs> or <i18n>) are not reported, since both are a legitimate part of an SFC.
🔧 Options
Nothing.
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-vue v10.12.0