Skip to content

Commit 65aff8f

Browse files
committed
chore: add vue/attributes-order eslint rule
1 parent e161c64 commit 65aff8f

File tree

624 files changed

+1833
-1825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

624 files changed

+1833
-1825
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ module.exports = {
9494
'vue/require-prop-types': 'off',
9595
'vue/one-component-per-file': 'off',
9696
'vue/custom-event-name-casing': ['error', { ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'] }],
97+
98+
'vue/attributes-order': ['error', {
99+
order: [
100+
'DEFINITION', 'LIST_RENDERING', 'CONDITIONALS', 'RENDER_MODIFIERS', 'UNIQUE', 'GLOBAL', 'SLOT',
101+
'TWO_WAY_BINDING', 'ATTR_DYNAMIC', 'ATTR_STATIC', 'ATTR_SHORTHAND_BOOL', 'OTHER_DIRECTIVES', 'EVENTS', 'CONTENT',
102+
],
103+
alphabetical: true,
104+
}],
97105
},
98106
overrides: [
99107
{

packages/docs/src/components/PageFeatures.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<page-feature-chip
1515
v-if="route.meta?.features?.figma"
1616
:text="t('figma-design')"
17-
prepend-icon="mdi-image"
1817
href="https://figma.vuetifyjs.com/"
19-
target="_blank"
18+
prepend-icon="mdi-image"
2019
rel="noopener noreferrer"
20+
target="_blank"
2121
>
2222
<template #prepend>
2323
<v-icon color="purple" />
@@ -27,10 +27,10 @@
2727
<page-feature-chip
2828
v-if="route.meta?.features?.report"
2929
:text="t('report-a-bug')"
30+
href="https://issues.vuetifyjs.com/"
3031
prepend-icon="mdi-bug-outline"
31-
target="_blank"
3232
rel="noopener noreferrer"
33-
href="https://issues.vuetifyjs.com/"
33+
target="_blank"
3434
>
3535
<template #prepend>
3636
<v-icon color="red" />
@@ -42,8 +42,8 @@
4242
:href="label"
4343
:text="t('open-issues')"
4444
prepend-icon="mdi-alert-circle-outline"
45-
target="_blank"
4645
rel="noopener noreferrer"
46+
target="_blank"
4747
>
4848
<template #prepend>
4949
<v-icon color="warning" />
@@ -52,11 +52,11 @@
5252

5353
<page-feature-chip
5454
v-if="route.meta?.features?.github"
55+
:href="`https://github.com/vuetifyjs/vuetify/tree/${branch}/packages/vuetify/src${route.meta.features.github}`"
5556
:text="t('view-in-github')"
5657
prepend-icon="mdi-github"
57-
:href="`https://github.com/vuetifyjs/vuetify/tree/${branch}/packages/vuetify/src${route.meta.features.github}`"
58-
target="_blank"
5958
rel="noopener noreferrer"
59+
target="_blank"
6060
>
6161
<template #prepend>
6262
<v-icon color="black" />
@@ -65,11 +65,11 @@
6565

6666
<page-feature-chip
6767
v-if="route.meta?.features?.spec"
68+
:href="route.meta.features.spec"
6869
:text="t('design-spec')"
6970
prepend-icon="mdi-material-design"
70-
:href="route.meta.features.spec"
71-
target="_blank"
7271
rel="noopener noreferrer"
72+
target="_blank"
7373
>
7474
<template #prepend>
7575
<v-icon color="surface-variant" />

packages/docs/src/components/about/TeamMember.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
@click.prevent="copyTextToClipboard(link.copyText)"
4343
>
4444
<v-icon
45-
:icon="link.icon"
4645
:color="link.color"
46+
:icon="link.icon"
4747
size="small"
4848
/>
4949
</div>
@@ -111,8 +111,8 @@
111111
class="text-subtitle d-flex align-center my-2"
112112
>
113113
<v-icon
114-
start
115114
:icon="icons[field]"
115+
start
116116
/>
117117

118118
<template v-if="Array.isArray(member[field])">

packages/docs/src/components/api/ApiTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/>
3030

3131
<tr v-if="item.description || (user.dev && item.source)">
32-
<td colspan="3" class="text-mono pt-4">
32+
<td class="text-mono pt-4" colspan="3">
3333
<template v-if="item.description">
3434
<AppMarkdown
3535
v-if="localeStore.locale !== 'eo-UY'"
@@ -51,7 +51,7 @@
5151
</template>
5252

5353
<tr v-if="!filtered.length">
54-
<td colspan="4" class="text-center text-disabled text-body-2">
54+
<td class="text-center text-disabled text-body-2" colspan="4">
5555
{{ t('search.no-results') }}
5656
</td>
5757
</tr>

packages/docs/src/components/api/EventsTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ApiApiTable :headers="headers">
33
<template #row="{ props, item }">
44
<tr v-bind="props">
5-
<ApiNameCell section="events" :name="item.name" :new-in="item.newIn" />
5+
<ApiNameCell :name="item.name" :new-in="item.newIn" section="events" />
66

77
<td>
88
<ApiPrismCell :code="item.formatted" />

packages/docs/src/components/api/ExposedTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ApiApiTable>
33
<template #row="{ props, item }">
44
<tr v-bind="props">
5-
<ApiNameCell section="exposed" :name="item.name" :new-in="item.newIn" />
5+
<ApiNameCell :name="item.name" :new-in="item.newIn" section="exposed" />
66
</tr>
77

88
<tr>

packages/docs/src/components/api/Inline.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
:readonly="components.length === 1"
1818
class="mb-2"
1919
color="primary"
20-
hide-details
2120
label="Component API"
2221
prepend-inner-icon="mdi-view-dashboard"
2322
style="max-width: 250px;"
2423
variant="outlined"
24+
hide-details
2525
/>
2626
</div>
2727

packages/docs/src/components/api/PropsTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ApiApiTable :headers="headers">
33
<template #row="{ props, item }">
44
<tr v-bind="props">
5-
<ApiNameCell section="props" :name="kebabCase(item.name)" :new-in="item.newIn" />
5+
<ApiNameCell :name="kebabCase(item.name)" :new-in="item.newIn" section="props" />
66

77
<td>
88
<ApiPrismCell :code="item.formatted" />

packages/docs/src/components/api/SassTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ApiApiTable :headers="headers">
33
<template #row="{ props, item }">
44
<tr v-bind="props">
5-
<ApiNameCell section="sass" :name="item.name" :new-in="item.newIn" />
5+
<ApiNameCell :name="item.name" :new-in="item.newIn" section="sass" />
66

77
<td>
88
<ApiPrismCell :code="item.default" />

packages/docs/src/components/api/Section.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/>
1010
</div> -->
1111
<AppHeadline v-if="showHeadline" :path="`api-headers.${section}`" />
12-
<TableComponent :name="name" :items="items" />
12+
<TableComponent :items="items" :name="name" />
1313
</div>
1414
</template>
1515

packages/docs/src/components/api/SlotsTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<ApiApiTable>
33
<template #row="{ props, item }">
44
<tr v-bind="props">
5-
<ApiNameCell section="slots" :name="item.name" :new-in="item.newIn" />
5+
<ApiNameCell :name="item.name" :new-in="item.newIn" section="slots" />
66
</tr>
77

88
<tr v-if="item.formatted !== 'never' && item.text !== 'undefined'">
9-
<AppMarkup :code="item.formatted" language="ts" :rounded="false" />
9+
<AppMarkup :code="item.formatted" :rounded="false" language="ts" />
1010
</tr>
1111
</template>
1212
</ApiApiTable>

packages/docs/src/components/app/BackToTop.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<v-layout-item
3-
v-scroll="onScroll"
43
class="text-end pointer-events-none"
5-
model-value
64
position="bottom"
75
size="88"
6+
model-value
7+
v-scroll="onScroll"
88
>
99
<div class="ma-4">
1010
<v-fab-transition>

packages/docs/src/components/app/Banner.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
:color="banner.metadata.color"
66
:height="height"
77
:image="banner.metadata.images.bg?.url"
8-
:theme="banner.metadata.theme.key"
98
:model-value="hasPromotion"
9+
:theme="banner.metadata.theme.key"
1010
flat
1111
>
1212
<a
@@ -42,8 +42,8 @@
4242
<template #default="{ isHovering, props }">
4343
<v-btn
4444
:color="banner.metadata.link_color"
45-
:href="banner.metadata.link"
4645
:elevation="isHovering ? 8 : 0"
46+
:href="banner.metadata.link"
4747
v-bind="{ ...props, ...banner.metadata.attributes }"
4848
append-icon="mdi-open-in-new"
4949
class="text-none me-2"
@@ -62,8 +62,8 @@
6262
v-if="banner.metadata.closable"
6363
class="ms-6 me-2"
6464
density="comfortable"
65-
size="small"
6665
icon="$clear"
66+
size="small"
6767
variant="plain"
6868
@click="onClose"
6969
/>

packages/docs/src/components/app/Btn.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-btn
3-
:variant="variant"
43
:icon="!!icon"
4+
:variant="variant"
55
class="text-body-2 text-capitalize px-3 app-btn"
66
color="medium-emphasis"
77
>

packages/docs/src/components/app/Heading.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<router-link
77
v-if="href"
88
:to="href"
9+
aria-hidden="true"
910
class="text-decoration-none text-end text-md-start d-none d-sm-inline-block"
1011
style="user-select: none"
11-
aria-hidden="true"
1212
>
1313
<span class="text-primary">#</span>
1414
</router-link>

packages/docs/src/components/app/SnackbarQueue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<v-snackbar
33
v-if="isVisible && current"
44
v-model="isActive"
5+
:color="current.color"
56
:timeout="current.timeout"
67
timer
7-
:color="current.color"
88
@after-leave="onAfterLeave"
99
>
1010
{{ current.message }}

packages/docs/src/components/app/TextField.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<v-text-field
33
:placeholder="t('search.label')"
44
base-color="disabled"
5+
prepend-inner-icon="mdi-magnify"
6+
variant="outlined"
57
hide-details
68
persistent-placeholder
7-
prepend-inner-icon="mdi-magnify"
89
single-line
9-
variant="outlined"
1010
>
1111
<template v-if="$slots['append-inner']" #append-inner>
1212
<slot name="append-inner" />

packages/docs/src/components/app/Toc.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
id="app-toc"
55
v-model="tocDrawer"
66
color="background"
7-
floating
87
location="right"
9-
sticky
108
width="256"
9+
floating
10+
sticky
1111
>
1212
<template
1313
v-if="routeToc?.length"
@@ -22,8 +22,8 @@
2222
<ul class="ms-5">
2323
<router-link
2424
v-for="{ to, level, text } in routeToc"
25-
v-slot="{ href }"
2625
:key="text"
26+
v-slot="{ href }"
2727
:to="to"
2828
custom
2929
>
@@ -77,20 +77,18 @@
7777
<v-btn
7878
:to="rpath('/introduction/sponsors-and-backers/')"
7979
append-icon="$vuetify"
80-
block
8180
class="text-none"
8281
color="primary"
8382
size="large"
84-
variant="tonal"
8583
text="Support"
84+
variant="tonal"
85+
block
8686
/>
8787
</v-col>
8888
</template>
8989

9090
<v-col v-else cols="12">
9191
<v-btn
92-
block
93-
border
9492
class="text-none border-opacity-50 border-primary"
9593
color="primary"
9694
href="https://github.com/sponsors/johnleider"
@@ -100,6 +98,8 @@
10098
target="_blank"
10199
text="Your Logo Here"
102100
variant="tonal"
101+
block
102+
border
103103
/>
104104
</v-col>
105105

@@ -109,8 +109,8 @@
109109
>
110110
<a
111111
:href="spot.spot.href"
112-
target="_blank"
113112
rel="noopener noreferrer sponsored"
113+
target="_blank"
114114
@click="gtagClick('toc', 'promotion', spot.spot.sponsor)"
115115
>
116116
<v-img :src="spot.spot.image.url" />

packages/docs/src/components/app/V2Banner.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<v-system-bar
33
v-if="showBanner"
44
color="#e7f0f6"
5-
theme="light"
65
height="52"
6+
theme="light"
77
>
88
<div class="text-blue-darken-3 text-start ms-4">
99
<div class="text-caption">
@@ -27,8 +27,8 @@
2727
<v-btn
2828
class="ms-4 ms-md-6 me-2"
2929
density="comfortable"
30-
size="small"
3130
icon="$clear"
31+
size="small"
3232
variant="plain"
3333
@click="onClose"
3434
/>

packages/docs/src/components/app/VerticalDivider.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
22
<v-divider
33
class="mx-2 my-auto"
4+
style="height: 16px;"
45
inset
56
vertical
6-
style="height: 16px;"
77
/>
88
</template>
99

packages/docs/src/components/app/bar/JobsLink.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<v-badge
33
:model-value="newJobs.length > 0"
44
color="#ED561B"
5-
dot
65
location="top end"
6+
dot
77
>
88
<AppBtn
9+
:icon="icon"
910
:to="rpath('/resources/jobs-for-vue/')"
1011
class="jobs-link"
11-
:icon="icon"
1212
@click="onClick"
1313
/>
1414
</v-badge>

packages/docs/src/components/app/bar/LanguageMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<AppMenuMenu
33
key="language-menu"
4-
:open-on-hover="false"
54
:items="items"
5+
:open-on-hover="false"
66
>
77
<template #activator="{ props }">
88
<AppBtn

0 commit comments

Comments
 (0)