vue/attributes-order
eslint-plugin-vue
Safe autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/attributes-order": "error",
},
},
]; <div
ref="header"
v-for="item in items"
v-once
id="uniqueID"
v-model="headerData"
my-prop="prop"
v-if="!visible"
is="header"
@click="functionCall"
v-text="textContent">
</div>
</template> <MyComponent
key="x"
v-model="x"
v-bind="object">
</MyComponent>
</template> <div
z-prop="Z"
a-prop="A">
</div>
<div
@input="bar"
@change="foo">
</div>
<div
v-on:click="functionCall"
v-on:[c]="functionCall">
</div>
<div
:z-prop="Z"
:a-prop="A">
</div>
<div
:class="foo"
class="bar">
</div>
</template><div
is="header"
v-for="item in items"
v-if="!visible"
v-once
id="uniqueID"
ref="header"
v-model="headerData"
my-prop="prop"
@click="functionCall"
v-text="textContent">
</div>
<div
v-for="item in items"
v-if="!visible"
prop-one="prop"
:prop-two="prop"
prop-three="prop"
@click="functionCall"
v-text="textContent">
</div>
<div
prop-one="prop"
:prop-two="prop"
prop-three="prop">
</div><MyComponent
v-bind="object"
id="x"
v-model="x"
v-bind:foo="x">
</MyComponent><div
a-custom-prop="value"
:another-custom-prop="value"
:blue-color="false"
boolean-prop
class="foo"
:class="bar"
z-prop="Z"
v-on:[c]="functionCall"
@change="functionCall"
v-on:click="functionCall"
@input="functionCall"
v-text="textContent">
</div>Examples from the ESLint documentation.
vue/attributes-order
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/attributes-order": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce v-on event naming style on custom components in template
Enforce specific casing for component definition name