Available rules


🔧 Indicates that the rule is fixable, and using --fix option on the command line can automatically fix some of the reported problems.

Base Rules (Enabling Correct ESLint Parsing)

Enforce all the rules in this category, as well as all higher priority rules, with:

  "extends": "plugin:vue/base"
Rule ID Description
vue/comment-directive support comment-directives in <template>
vue/jsx-uses-vars prevent variables used in JSX to be marked as unused

Priority A: Essential (Error Prevention)

Enforce all the rules in this category, as well as all higher priority rules, with:

  "extends": "plugin:vue/essential"
Rule ID Description
vue/no-async-in-computed-properties disallow asynchronous actions in computed properties
vue/no-dupe-keys disallow duplication of field names
vue/no-duplicate-attributes disallow duplication of attributes
vue/no-parsing-error disallow parsing errors in <template>
vue/no-reserved-keys disallow overwriting reserved keys
vue/no-shared-component-data enforce component's data property to be a function 🔧
vue/no-side-effects-in-computed-properties disallow side effects in computed properties
vue/no-template-key disallow key attribute on <template>
vue/no-textarea-mustache disallow mustaches in <textarea>
vue/no-unused-components disallow registering components that are not used inside templates
vue/no-unused-vars disallow unused variable definitions of v-for directives or scope attributes
vue/no-use-v-if-with-v-for disallow use v-if on the same element as v-for
vue/require-component-is require v-bind:is of <component> elements
vue/require-prop-type-constructor require prop type to be a constructor 🔧
vue/require-render-return enforce render function to always return value
vue/require-v-for-key require v-bind:key with v-for directives
vue/require-valid-default-prop enforce props default values to be valid
vue/return-in-computed-property enforce that a return statement is present in computed property
vue/use-v-on-exact enforce usage of exact modifier on v-on
vue/valid-template-root enforce valid template root
vue/valid-v-bind enforce valid v-bind directives
vue/valid-v-cloak enforce valid v-cloak directives
vue/valid-v-else-if enforce valid v-else-if directives
vue/valid-v-else enforce valid v-else directives
vue/valid-v-for enforce valid v-for directives
vue/valid-v-html enforce valid v-html directives
vue/valid-v-if enforce valid v-if directives
vue/valid-v-model enforce valid v-model directives
vue/valid-v-on enforce valid v-on directives
vue/valid-v-once enforce valid v-once directives
vue/valid-v-pre enforce valid v-pre directives
vue/valid-v-show enforce valid v-show directives
vue/valid-v-text enforce valid v-text directives

Enforce all the rules in this category, as well as all higher priority rules, with:

  "extends": "plugin:vue/strongly-recommended"
Rule ID Description
vue/attribute-hyphenation enforce attribute naming style on custom components in template 🔧
vue/html-closing-bracket-newline require or disallow a line break before tag's closing brackets 🔧
vue/html-closing-bracket-spacing require or disallow a space before tag's closing brackets 🔧
vue/html-end-tags enforce end tag style 🔧
vue/html-indent enforce consistent indentation in <template> 🔧
vue/html-quotes enforce quotes style of HTML attributes 🔧
vue/html-self-closing enforce self-closing style 🔧
vue/max-attributes-per-line enforce the maximum number of attributes per line 🔧
vue/multiline-html-element-content-newline require a line break before and after the contents of a multiline element 🔧
vue/mustache-interpolation-spacing enforce unified spacing in mustache interpolations 🔧
vue/name-property-casing enforce specific casing for the name property in Vue components 🔧
vue/no-multi-spaces disallow multiple spaces 🔧
vue/no-spaces-around-equal-signs-in-attribute disallow spaces around equal signs in attribute 🔧
vue/no-template-shadow disallow variable declarations from shadowing variables declared in the outer scope
vue/prop-name-casing enforce specific casing for the Prop name in Vue components 🔧
vue/require-default-prop require default value for props
vue/require-prop-types require type definitions in props
vue/singleline-html-element-content-newline require a line break before and after the contents of a singleline element 🔧
vue/v-bind-style enforce v-bind directive style 🔧
vue/v-on-style enforce v-on directive style 🔧

Enforce all the rules in this category, as well as all higher priority rules, with:

  "extends": "plugin:vue/recommended"
Rule ID Description
vue/attributes-order enforce order of attributes 🔧
vue/no-v-html disallow use of v-html to prevent XSS attack
vue/order-in-components enforce order of properties in components 🔧
vue/this-in-template disallow usage of this in template


No preset enables the rules in this category. Please enable each rule if you want.

For example:

  "rules": {
    "vue/array-bracket-spacing": "error"
Rule ID Description
vue/array-bracket-spacing enforce consistent spacing inside array brackets 🔧
vue/arrow-spacing enforce consistent spacing before and after the arrow in arrow functions 🔧
vue/block-spacing disallow or enforce spaces inside of blocks after opening block and before closing block 🔧
vue/brace-style enforce consistent brace style for blocks 🔧
vue/camelcase enforce camelcase naming convention
vue/comma-dangle require or disallow trailing commas 🔧
vue/component-name-in-template-casing enforce specific casing for the component naming style in template 🔧
vue/eqeqeq require the use of === and !== 🔧
vue/key-spacing enforce consistent spacing between keys and values in object literal properties 🔧
vue/match-component-file-name require component name property to match its file name
vue/no-boolean-default disallow boolean defaults 🔧
vue/no-restricted-syntax disallow specified syntax
vue/object-curly-spacing enforce consistent spacing inside braces 🔧
vue/require-direct-export require the component to be directly exported
vue/script-indent enforce consistent indentation in <script> 🔧
vue/space-infix-ops require spacing around infix operators 🔧
vue/space-unary-ops enforce consistent spacing before or after unary operators 🔧
vue/v-on-function-call enforce or forbid parentheses after method calls without arguments in v-on directives 🔧


  • ⚠️ We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
  • 😇 We don't fix bugs which are in deprecated rules since we don't have enough resources.
Rule ID Replaced by
vue/no-confusing-v-for-v-if vue/no-use-v-if-with-v-for
Last Updated: 2/3/2019, 2:57:21 AM