[READ-ONLY] Mirror of https://github.com/sxzz/eslint-plugin-vuekit. Modern ESLint plugin for Vue 3 eslint-plugin-vuekit.sxzz.dev
eslint plugin vue
eslint-plugin-vuekit docs rules require-render-return.md
1.4 kB · 69 lines
Markdown
at main


pageClass: rule-details sidebarDepth: 0 title: vue/require-render-return description: enforce render function to always return value since: v3.10.0 #

vue/require-render-return #

enforce render function to always return value

  • ⚙️ This rule is included in the following preset configs:
    • *.configs.essential
    • *.configs["strongly-recommended"]
    • *.configs.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 #

🚀 Version #

This rule was introduced in eslint-plugin-vue v3.10.0

🔍 Implementation #