vue/no-irregular-whitespace
Disallow irregular whitespace in script blocks and templates.
| 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 expression contains a non-breaking space.
<template>
<p>{{ value + other }}</p>
</template>
Good
The expression uses ordinary source whitespace.
<template>
<p>{{ value + other }}</p>
</template>
Configuration (Vite+)
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({}).withVue({
linter: {
"preset": "incremental",
"rules": {
"vue/no-irregular-whitespace": "warn"
}
},
});
Then run vp run lint.