# no-irregular-whitespace

Rule `vue/no-irregular-whitespace`. Disallow irregular whitespace in `.vue` files

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-irregular-whitespace` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-irregular-whitespace.html) |
| Biome | `suspicious/noIrregularWhitespace` | yes | no | group suspicious, since 1.9.0 | [docs](https://biomejs.dev/linter/rules/no-irregular-whitespace/) |

## Code examples

### Incorrect: the rule reports this

```vue
  <div class="foobar" />
  <!--           ^ LINE TABULATION (U+000B) -->
</template>
<script>
/* ✓ GOOD */
var foo = bar;
/* ✗ BAD */
var foo =bar;
//       ^ LINE TABULATION (U+000B)
</script>
```

### Correct: the rule accepts this

```vue
<div class="foo bar" />
```

```vue
  <!-- []< LINE TABULATION (U+000B) -->
</template>
<script>
/* ✓ GOOD */
// []< LINE TABULATION (U+000B)
/* []< LINE TABULATION (U+000B) */
</script>
```

```vue
  <div class="foobar" />
  <!--           ^ LINE TABULATION (U+000B) -->
</template>
```

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

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noIrregularWhitespace": "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-irregular-whitespace](https://lintradar.dev/rules/eslint/no-irregular-whitespace.md): Disallow irregular whitespace
- [vue/no-empty-pattern](https://lintradar.dev/rules/vue/no-empty-pattern.md): Disallow empty destructuring patterns in `<template>`
- [vue/no-loss-of-precision](https://lintradar.dev/rules/vue/no-loss-of-precision.md): Disallow literal numbers that lose precision in `<template>`
- [vue/eqeqeq](https://lintradar.dev/rules/vue/eqeqeq.md): Require the use of `===` and `!==` in `<template>`
- [vue/no-sparse-arrays](https://lintradar.dev/rules/vue/no-sparse-arrays.md): Disallow sparse arrays in `<template>`
- [vue/dot-notation](https://lintradar.dev/rules/vue/dot-notation.md): Enforce dot notation whenever possible in `<template>`

---

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