JS.VUE.VALID.ATTRIBUTE.NAME

Invalid HTML attributes

Rule Details

This rule detects invalid HTML attributes.

{'vue/valid-attribute-name': ['error']}

Copy
<template>
  <!-- GOOD -->
  <p foo.bar></p>
  <p foo-bar></p>
  <p _foo.bar></p>
  <p :foo-bar></p>

  <!-- BAD -->
  <p 0abc></p>
  <p -def></p>
  <p !ghi></p>
</template>

Options

Nothing.

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/