vue/no-restricted-static-attribute
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-static-attribute": "error",
},
},
]; <div foo="x" />
<div bar />
</template> <div foo="bar" />
</template> <MyButton foo="x" />
</template><div foo="foo" /><CoolButton foo="x" />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-static-attribute
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-static-attribute": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow unsupported Vue.js syntax on the specified version