# no-restricted-syntax

Rule `vue/no-restricted-syntax`. Disallow specified syntax in `<template>`

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 758.7K weekly downloads of presets that enable it
- Trend: +49.9% last quarter
- Rank: #1599 by reach, #816 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-restricted-syntax` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-restricted-syntax.html) |

## Code examples

### Incorrect: the rule reports this

```vue
  <div> {{ foo() }} </div>
  <div> {{ foo.bar() }} </div>
  <div> {{ foo().bar }} </div>
</template>
```

### Correct: the rule accepts this

```vue
<div> {{ foo }} </div>
<div> {{ foo.bar }} </div>
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-restricted-syntax": "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/no-restricted-syntax](https://lintradar.dev/rules/eslint/no-restricted-syntax.md): Disallow specified syntax
- [jsdoc/no-restricted-syntax](https://lintradar.dev/rules/jsdoc/no-restricted-syntax.md): Reports when certain comment structures are present.
- [vue/keyword-spacing](https://lintradar.dev/rules/vue/keyword-spacing.md): Enforce consistent spacing before and after keywords in `<template>`
- [vue/no-restricted-v-bind](https://lintradar.dev/rules/vue/no-restricted-v-bind.md): Disallow specific argument in `v-bind`
- [vue/key-spacing](https://lintradar.dev/rules/vue/key-spacing.md): Enforce consistent spacing between keys and values in object literal properties in `<template>`
- [vue/object-curly-spacing](https://lintradar.dev/rules/vue/object-curly-spacing.md): Enforce consistent spacing inside braces in `<template>`

---

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