Vize

vue/dot-notation

Prefer dot notation in template expressions.

Default severity Presets Automatic fix Options
warning None No None

Applies to: Vue SFC templates and blocks, with script context where the rule requires it.

Bad

The static name property is accessed with brackets.

<template>
  <p>{{ user["name"] }}</p>
</template>

Good

Dot notation expresses the same static property directly.

<template>
  <p>{{ user.name }}</p>
</template>

Configuration (Vite+)

import { defineConfig } from "@vizejs/vite-plugin/vite-plus";

export default defineConfig({}).withVue({
  linter: {
    "preset": "incremental",
    "rules": {
      "vue/dot-notation": "warn"
    }
  },
});

Then run vp run lint.