# dot-notation

Rule `vue/dot-notation`. Enforce dot notation whenever possible in `<template>`

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 758.7K weekly downloads of presets that enable it
- Trend: +49.9% last quarter
- Rank: #1575 by reach, #792 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/dot-notation` | no | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/dot-notation.html) |
| Biome | `complexity/useLiteralKeys` | yes | unsafe | group complexity, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/use-literal-keys/) |

## Code examples

### Incorrect: the rule reports this

```js
a.b["c"];
```

```js
a.c[`d`]
```

```js
a.c[`d`] = "something"
```

### Correct: the rule accepts this

```js
a["c" + "d"];
a[d.c];
```

Examples from the Biome documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/dot-notation": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "useLiteralKeys": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |

## Related rules

- [eslint/dot-notation](https://lintradar.dev/rules/eslint/dot-notation.md): Enforce dot notation whenever possible
- [typescript/dot-notation](https://lintradar.dev/rules/typescript/dot-notation.md): Enforce dot notation whenever possible
- [vue/define-macros-order](https://lintradar.dev/rules/vue/define-macros-order.md): Enforce order of compiler macros (`defineProps`, `defineEmits`, etc.)
- [vue/eqeqeq](https://lintradar.dev/rules/vue/eqeqeq.md): Require the use of `===` and `!==` in `<template>`
- [vue/component-options-name-casing](https://lintradar.dev/rules/vue/component-options-name-casing.md): Enforce the casing of component name in `components` options
- [vue/no-empty-pattern](https://lintradar.dev/rules/vue/no-empty-pattern.md): Disallow empty destructuring patterns in `<template>`

---

Web page: https://lintradar.dev/rules/vue/dot-notation. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
