Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.24 KB

require-render-return.md

File metadata and controls

59 lines (44 loc) · 1.24 KB
pageClass sidebarDepth title description
rule-details
0
vue/require-render-return
enforce render function to always return value

vue/require-render-return

enforce render function to always return value

  • ⚙️ This rule is included in all of "plugin:vue/essential", "plugin:vue/strongly-recommended" and "plugin:vue/recommended".

📖 Rule Details

This rule aims to enforce render function to always return value

<script>
export default {
  /* ✓ GOOD */
  render (h) {
    return h('div', 'hello')
  }
}
</script>
<script>
export default {
  /* ✗ BAD */
  render (h) {
    if (foo) {
      return h('div', 'hello')
    }
  }
}
</script>

🔧 Options

Nothing.

📚 Further reading

🔍 Implementation