vue/valid-attribute-name
eslint-plugin-vue
No autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-attribute-name": "error",
},
},
]; <p 0abc></p>
<p -def></p>
<p !ghi></p>
</template><p foo.bar></p>
<p foo-bar></p>
<p _foo.bar></p>
<p :foo-bar></p>Examples from the ESLint documentation.
vue/valid-attribute-name
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-attribute-name": "error",
},
},
];Oxlint does not have this rule.
nursery/useVueValidAttributeName
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"useVueValidAttributeName": "error"
}
}
}
}Enforce props default values to be valid