vue/no-useless-concat
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-useless-concat": "error",
},
},
];Disallow unnecessary concatenation of literals or template literals in <template>
const a = "a" + "b";const foo = "string" + 123;const a = "a" + "b" + "c";const a = 1 + 1;const a = 1 * '2';const a = 1 - 2;Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/no-useless-concat
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-useless-concat": "error",
},
},
];Oxlint does not have this rule.
complexity/noUselessStringConcat
complexity · since 1.8.0
{
"linter": {
"rules": {
"complexity": {
"noUselessStringConcat": "error"
}
}
}
}Disallow unnecessary concatenation of literals or template literals
Disallow useless concatenation of literals.
Disallow using v-else-if/v-else on the same element as v-for
Enforce Boolean comes first in component prop types