Skip to content

New rule: no-empty-component-block #952

Closed
@TheAlexLichter

Description

@TheAlexLichter

Please describe what the rule should do:
The rule should avoid empty <style scoped></style>, script or template tags. If there are no style rules, a style tag is not necessary.

Edge case: Tags that have a src attribute (should be valid).

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<template>
  <h1>Hey</h1>
</template>

<script></script>

<style scoped></style>
<template>
  <h1>Hey</h1>
</template>

<style scoped></style>
<template>
</template>

<script>
export default { 
  render (h) { return h('div','Hi') }  // Or so
}
</script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions