Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

a4376eb Β· Apr 2, 2019

History

History

rules

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 28, 2019
Jan 5, 2019
Jan 26, 2019
Dec 30, 2018
Feb 27, 2019
Jan 29, 2019
Jan 29, 2019
Jan 29, 2019
Jan 29, 2019
Dec 30, 2018
Jan 3, 2019
Feb 27, 2019
Jan 5, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Jan 9, 2019
Jan 5, 2019
Feb 3, 2019
Dec 30, 2018
Feb 3, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Feb 3, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Feb 27, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Jan 9, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Apr 2, 2019
Feb 27, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Jan 5, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Jan 7, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Feb 3, 2019
Jan 5, 2019
Jan 5, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Feb 27, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Feb 14, 2019
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018
Dec 30, 2018

README.md

sidebarDepth
0

Available rules

::: tip Legend :wrench: 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

Priority B: Strongly Recommended (Improving Readability)

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 πŸ”§

Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

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

Uncategorized

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/dot-location enforce consistent newlines before and after dots πŸ”§
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-empty-pattern disallow empty destructuring patterns
vue/no-restricted-syntax disallow specified syntax
vue/no-unsupported-features disallow unsupported Vue.js syntax on the specified version πŸ”§
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 πŸ”§

Deprecated

  • ⚠️ 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