vue/no-restricted-html-elements
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-html-elements": "error",
},
},
]; <button></button>
<marquee></marquee>
</template> <a></a>
<marquee></marquee>
</template> <marquee></marquee>
<a></a>
</template><p></p>
<input />
<br />Examples from the ESLint 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-restricted-html-elements
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-html-elements": "error",
},
},
];Oxlint does not have this rule.
correctness/noRestrictedElements
correctness · since 2.0.0
{
"linter": {
"rules": {
"correctness": {
"noRestrictedElements": "error"
}
}
}
}Disallow asynchronously called restricted methods
Disallow usages of ref objects that can lead to loss of reactivity
Disallow usages that lose the reactivity of props passed to setup
Disallow the use of event names that collide with native web event names