vue/no-implicit-coercion
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-implicit-coercion": "error",
},
},
];!!foo;+foo;-(-foo);Boolean(foo);Number(foo);String(foo);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-implicit-coercion
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-implicit-coercion": "error",
},
},
];Oxlint does not have this rule.
complexity/noImplicitCoercions
complexity · since 2.1.0
{
"linter": {
"rules": {
"complexity": {
"noImplicitCoercions": "error"
}
}
}
}Disallow shorthand type conversions
Disallow passing multiple objects in an array to class
Disallow constant expressions in conditions in <template>