# no-extra-parens

Rule `vue/no-extra-parens`. Disallow unnecessary parentheses in `<template>`

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```vue
  <div :class="(foo + bar)" />
  {{ (foo + bar) }}
  {{ (foo + bar) | filter }}
</template>
```

### Correct: the rule accepts this

```vue
<div :class="foo + bar" />
{{ foo + bar }}
{{ foo + bar | filter }}
```

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-extra-parens": "error",
    },
  },
];
```

## Related rules

- [eslint/no-extra-parens](https://lintradar.dev/rules/eslint/no-extra-parens.md): Disallow unnecessary parentheses
- [vue/no-empty-component-block](https://lintradar.dev/rules/vue/no-empty-component-block.md): Disallow the `<template>` `<script>` `<style>` block to be empty
- [vue/no-literals-in-template](https://lintradar.dev/rules/vue/no-literals-in-template.md): Disallow object, array, and function literals in template
- [vue/no-duplicate-class-names](https://lintradar.dev/rules/vue/no-duplicate-class-names.md): Disallow duplication of class names in class attributes
- [vue/no-potential-component-option-typo](https://lintradar.dev/rules/vue/no-potential-component-option-typo.md): Disallow a potential typo in your component property
- [vue/no-duplicate-attr-inheritance](https://lintradar.dev/rules/vue/no-duplicate-attr-inheritance.md): Enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`

---

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