vue/no-irregular-whitespace
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-irregular-whitespace": "error",
},
},
]; <div class="foobar" />
<!-- ^ LINE TABULATION (U+000B) -->
</template>
<script>
/* ✓ GOOD */
var foo = bar;
/* ✗ BAD */
var foo =bar;
// ^ LINE TABULATION (U+000B)
</script><div class="foo bar" /> <!-- []< LINE TABULATION (U+000B) -->
</template>
<script>
/* ✓ GOOD */
// []< LINE TABULATION (U+000B)
/* []< LINE TABULATION (U+000B) */
</script> <div class="foobar" />
<!-- ^ LINE TABULATION (U+000B) -->
</template>Examples from the ESLint documentation.
vue/no-irregular-whitespace
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-irregular-whitespace": "error",
},
},
];Oxlint does not have this rule.
suspicious/noIrregularWhitespace
suspicious · since 1.9.0
{
"linter": {
"rules": {
"suspicious": {
"noIrregularWhitespace": "error"
}
}
}
}Disallow irregular whitespace
Disallow empty destructuring patterns in <template>
Disallow literal numbers that lose precision in <template>
Enforce dot notation whenever possible in <template>