vue/no-restricted-block
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-block": "error",
},
},
];<foo>
Custom block
</foo>
<bar>
Custom block
</bar>
<style>
.foo {}
</style><foo>
✗ BAD
</foo>
<forbidden-block></forbidden-block>
<block-forbidden></block-forbidden>The documentation shows no correct example for this rule.
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-block
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-block": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow a potential typo in your component property
Disallow object, array, and function literals in template