Vue/dot-notation | Eslint-plugin-vue

Skip to contentMenuReturn to top Sidebar Navigation

Rules

Available Rules

Base Rules

vue/comment-directive

vue/jsx-uses-vars

Priority A: Essential

vue/multi-word-component-names

vue/no-arrow-functions-in-watch

vue/no-async-in-computed-properties

vue/no-child-content

vue/no-computed-properties-in-data

vue/no-dupe-keys

vue/no-dupe-v-else-if

vue/no-duplicate-attributes

vue/no-export-in-script-setup

vue/no-mutating-props

vue/no-parsing-error

vue/no-ref-as-operand

vue/no-reserved-component-names

vue/no-reserved-keys

vue/no-reserved-props

vue/no-shared-component-data

vue/no-side-effects-in-computed-properties

vue/no-template-key

vue/no-textarea-mustache

vue/no-unused-components

vue/no-unused-vars

vue/no-use-computed-property-like-method

vue/no-use-v-if-with-v-for

vue/no-useless-template-attributes

vue/no-v-text-v-html-on-component

vue/require-component-is

vue/require-prop-type-constructor

vue/require-render-return

vue/require-v-for-key

vue/require-valid-default-prop

vue/return-in-computed-property

vue/return-in-emits-validator

vue/use-v-on-exact

vue/valid-attribute-name

vue/valid-define-emits

vue/valid-define-props

vue/valid-next-tick

vue/valid-template-root

vue/valid-v-bind

vue/valid-v-cloak

vue/valid-v-else-if

vue/valid-v-else

vue/valid-v-for

vue/valid-v-html

vue/valid-v-if

vue/valid-v-model

vue/valid-v-on

vue/valid-v-once

vue/valid-v-pre

vue/valid-v-show

vue/valid-v-slot

vue/valid-v-text

Priority A: Essential for Vue.js 3.x

vue/no-deprecated-data-object-declaration

vue/no-deprecated-delete-set

vue/no-deprecated-destroyed-lifecycle

vue/no-deprecated-dollar-listeners-api

vue/no-deprecated-dollar-scopedslots-api

vue/no-deprecated-events-api

vue/no-deprecated-filter

vue/no-deprecated-functional-template

vue/no-deprecated-html-element-is

vue/no-deprecated-inline-template

vue/no-deprecated-model-definition

vue/no-deprecated-props-default-this

vue/no-deprecated-router-link-tag-prop

vue/no-deprecated-scope-attribute

vue/no-deprecated-slot-attribute

vue/no-deprecated-slot-scope-attribute

vue/no-deprecated-v-bind-sync

vue/no-deprecated-v-is

vue/no-deprecated-v-on-native-modifier

vue/no-deprecated-v-on-number-modifiers

vue/no-deprecated-vue-config-keycodes

vue/no-expose-after-await

vue/no-lifecycle-after-await

vue/no-v-for-template-key-on-child

vue/no-watch-after-await

vue/prefer-import-from-vue

vue/require-slots-as-functions

vue/require-toggle-inside-transition

vue/valid-define-options

vue/valid-v-is

vue/valid-v-memo

Priority A: Essential for Vue.js 2.x

vue/no-custom-modifiers-on-v-model

vue/no-multiple-template-root

Priority B: Strongly Recommended

vue/attribute-hyphenation

vue/component-definition-name-casing

vue/first-attribute-linebreak

vue/html-closing-bracket-newline

vue/html-closing-bracket-spacing

vue/html-end-tags

vue/html-indent

vue/html-quotes

vue/html-self-closing

vue/max-attributes-per-line

vue/multiline-html-element-content-newline

vue/mustache-interpolation-spacing

vue/no-multi-spaces

vue/no-spaces-around-equal-signs-in-attribute

vue/no-template-shadow

vue/one-component-per-file

vue/prop-name-casing

vue/require-default-prop

vue/require-prop-types

vue/singleline-html-element-content-newline

vue/v-bind-style

vue/v-on-style

vue/v-slot-style

Priority B: Strongly Recommended for Vue.js 3.x

vue/require-explicit-emits

vue/v-on-event-hyphenation

Priority C: Recommended

vue/attributes-order

vue/block-order

vue/no-lone-template

vue/no-multiple-slot-args

vue/no-required-prop-with-default

vue/no-v-html

vue/order-in-components

vue/this-in-template

Uncategorized

vue/block-lang

vue/block-tag-newline

vue/component-api-style

vue/component-name-in-template-casing

vue/component-options-name-casing

vue/custom-event-name-casing

vue/define-emits-declaration

vue/define-macros-order

vue/define-props-declaration

vue/define-props-destructuring

vue/enforce-style-attribute

vue/html-button-has-type

vue/html-comment-content-newline

vue/html-comment-content-spacing

vue/html-comment-indent

vue/match-component-file-name

vue/match-component-import-name

vue/max-lines-per-block

vue/max-props

vue/max-template-depth

vue/new-line-between-multi-line-property

vue/next-tick-style

vue/no-bare-strings-in-template

vue/no-boolean-default

vue/no-duplicate-attr-inheritance

vue/no-duplicate-class-names

vue/no-empty-component-block

vue/no-import-compiler-macros

vue/no-literals-in-template

vue/no-multiple-objects-in-class

vue/no-negated-v-if-condition

vue/no-potential-component-option-typo

vue/no-ref-object-reactivity-loss

vue/no-restricted-block

vue/no-restricted-call-after-await

vue/no-restricted-class

vue/no-restricted-component-names

vue/no-restricted-component-options

vue/no-restricted-custom-event

vue/no-restricted-html-elements

vue/no-restricted-props

vue/no-restricted-static-attribute

vue/no-restricted-v-bind

vue/no-restricted-v-on

vue/no-root-v-if

vue/no-setup-props-reactivity-loss

vue/no-static-inline-styles

vue/no-template-target-blank

vue/no-this-in-before-route-enter

vue/no-undef-components

vue/no-undef-directives

vue/no-undef-properties

vue/no-unsupported-features

vue/no-unused-emit-declarations

vue/no-unused-properties

vue/no-unused-refs

vue/no-use-v-else-with-v-for

vue/no-useless-mustaches

vue/no-useless-v-bind

vue/no-v-text

vue/padding-line-between-blocks

vue/padding-line-between-tags

vue/padding-lines-in-component-definition

vue/prefer-define-options

vue/prefer-prop-type-boolean-first

vue/prefer-separate-static-class

vue/prefer-true-attribute-shorthand

vue/prefer-use-template-ref

vue/require-default-export

vue/require-direct-export

vue/require-emit-validator

vue/require-explicit-slots

vue/require-expose

vue/require-macro-variable-name

vue/require-name-property

vue/require-prop-comment

vue/require-typed-object-prop

vue/require-typed-ref

vue/restricted-component-names

vue/script-indent

vue/slot-name-casing

vue/sort-keys

vue/static-class-names-order

vue/v-for-delimiter-style

vue/v-if-else-key

vue/v-on-handler-style

Extension Rules

vue/array-bracket-newline

vue/array-bracket-spacing

vue/array-element-newline

vue/arrow-spacing

vue/block-spacing

vue/brace-style

vue/camelcase

vue/comma-dangle

vue/comma-spacing

vue/comma-style

vue/dot-location

vue/dot-notation

vue/eqeqeq

vue/func-call-spacing

vue/key-spacing

vue/keyword-spacing

vue/max-len

vue/multiline-ternary

vue/no-console

vue/no-constant-condition

vue/no-empty-pattern

vue/no-extra-parens

vue/no-implicit-coercion

vue/no-irregular-whitespace

vue/no-loss-of-precision

vue/no-negated-condition

vue/no-restricted-syntax

vue/no-sparse-arrays

vue/no-useless-concat

vue/object-curly-newline

vue/object-curly-spacing

vue/object-property-newline

vue/object-shorthand

vue/operator-linebreak

vue/prefer-template

vue/quote-props

vue/space-in-parens

vue/space-infix-ops

vue/space-unary-ops

vue/template-curly-spacing

Deprecated

vue/no-v-for-template-key

vue/no-v-model-argument

vue/valid-model-definition

vue/valid-v-bind-sync

On this pagevue/dot-notation ​

Enforce dot notation whenever possible in <template>

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

This rule is the same rule as core dot-notation rule but it applies to the expressions in <template>.

📚 Further Reading ​

  • dot-notation

🚀 Version ​

This rule was introduced in eslint-plugin-vue v7.0.0

🔍 Implementation ​

  • Rule source
  • Test source

Taken with ❤️ from ESLint core

Từ khóa » V On Dot