Skip to content

Open source personal finance application

chore: reorder class attributes to use eslint rules

Ilya Komichev1cc38e17a8a0
diff --git a/app/components/date/Ranges.vue b/app/components/date/Ranges.vue
index f35ce72e..4554d321 100644
--- a/app/components/date/Ranges.vue
+++ b/app/components/date/Ranges.vue
@@ -124,7 +124,7 @@ function selectMaxRange(isSkipEmpty = false) {
</template>
<template v-if="props.isShowRangeAdjust">
- <div class="flex border border-default rounded-sm bg-default p-px gap-1">
+ <div class="border-default bg-default flex gap-1 rounded-sm border p-px">
<DateLinkItem
v-bind="props.itemProps"
@click="props.statDate.minusRange"
diff --git a/app/components/trnForm/Categories.vue b/app/components/trnForm/Categories.vue
index adc6a69f..5e4ad66f 100644
--- a/app/components/trnForm/Categories.vue
+++ b/app/components/trnForm/Categories.vue
@@ -46,7 +46,7 @@ onMounted(() => {
<!-- Recent -->
<div class="swiper-slide h-full">
<div
- class="scrollerBlock rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center font-primary text-xl font-semibold"
+ class="scrollerBlock font-primary rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center text-xl font-semibold"
>
{{ $t('categories.recentCategories') }}
</div>
@@ -63,7 +63,7 @@ onMounted(() => {
<!-- Main -->
<div class="swiper-slide h-full">
<div
- class="scrollerBlock rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center font-primary text-xl font-semibold"
+ class="scrollerBlock font-primary rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center text-xl font-semibold"
>
{{ $t('categories.title') }}
</div>
@@ -79,7 +79,7 @@ onMounted(() => {
<!-- Favorite -->
<div class="swiper-slide h-full">
- <div class="scrollerBlock rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center font-primary text-xl font-semibold">
+ <div class="scrollerBlock font-primary rounded-t-2xl bg-[var(--item-1)] px-3 py-4 text-center text-xl font-semibold">
{{ $t('categories.favoriteCategories') }}
</div>
<div class="px-3 pb-1">
diff --git a/app/components/trnForm/Date.vue b/app/components/trnForm/Date.vue
index 66d64023..8f16d216 100644
--- a/app/components/trnForm/Date.vue
+++ b/app/components/trnForm/Date.vue
@@ -36,8 +36,8 @@ function changeDate(way: 'prev' | 'next' | 'today') {
@onCloseModal="isShow = false"
>
<template #trigger>
- <UiItem1 class="grid grow !justify-start p-2 text-2">
- <div class="text-sm text-1">
+ <UiItem1 class="text-2 grid grow !justify-start p-2">
+ <div class="text-1 text-sm">
{{ formattedDate.day }} {{ formattedDate.month }}
</div>
<div class="font-regular text-2xs leading-none">
diff --git a/app/components/trnForm/TrnsSlide.vue b/app/components/trnForm/TrnsSlide.vue
index b81c41df..0a3a0d86 100644
--- a/app/components/trnForm/TrnsSlide.vue
+++ b/app/components/trnForm/TrnsSlide.vue
@@ -93,7 +93,7 @@ const tabs = computed<{ id: FilterBy, name: string }[]>(() => [
<UiTabsItem1
v-for="tab in tabs"
:key="tab.id"
- class="whitespace-nowrap text-xs"
+ class="text-xs whitespace-nowrap"
:isActive="tab.id === filterBy"
@click="changeFilter(tab.id)"
>
diff --git a/app/components/trnForm/main/CalculatorButton.vue b/app/components/trnForm/main/CalculatorButton.vue
index 3ca92b39..f18b317b 100644
--- a/app/components/trnForm/main/CalculatorButton.vue
+++ b/app/components/trnForm/main/CalculatorButton.vue
@@ -7,18 +7,18 @@ const emit = defineEmits<{
<template>
<div
class="
- @xs/trnForm:w-14 @sm/trnForm:w-16
- flex aspect-square w-12
+ bg-item-3 font-secondary
+ text-2 hover:border-item-6 flex
+ aspect-square
+ w-12
items-center
- justify-center
- rounded-full
- bg-item-3 p-1 font-secondary
+ justify-center rounded-full p-1
text-2xl
font-normal
- text-2 transition
- hover:scale-[1.02]
- hover:border-item-6
+ transition hover:scale-[1.02]
hover:bg-[var(--item-5)]
+ @xs/trnForm:w-14
+ @sm/trnForm:w-16
"
tabindex="0"
@click="() => emit('click')"
diff --git a/app/components/trnForm/main/Description.vue b/app/components/trnForm/main/Description.vue
index bfdb5f2f..22e9176b 100644
--- a/app/components/trnForm/main/Description.vue
+++ b/app/components/trnForm/main/Description.vue
@@ -34,7 +34,7 @@ function onSave(close: () => void) {
<Icon name="lucide:message-square" size="26" />
<div
v-if="!!trnsFormStore.values.desc"
- class="absolute right-1 top-1 aspect-square w-2 rounded-full bg-(--ui-primary)"
+ class="absolute top-1 right-1 aspect-square w-2 rounded-full bg-(--ui-primary)"
/>
</TrnFormMainCalculatorButton>
</template>
diff --git a/app/components/trns/List.vue b/app/components/trns/List.vue
index 208a07af..aaca75e2 100644
--- a/app/components/trns/List.vue
+++ b/app/components/trns/List.vue
@@ -218,7 +218,7 @@ function onOpenTrnForm(date: number) {
<!-- Group Sum -->
<div
v-if="isShowGroupSum && paginatedTrnsIds.length > 1"
- class="border-b border-item-4 pb-2 pr-3 opacity-60"
+ class="border-item-4 border-b pr-3 pb-2 opacity-60"
>
<Amount
v-if="getTotalOfTrnsIds(paginatedTrnsIds).income !== 0"
@@ -261,7 +261,7 @@ function onOpenTrnForm(date: number) {
<div
v-for="(groupTrnsIds, date) in groupedTrns"
:key="date"
- class="_bg-item-2 _rounded-lg _border-b overflow-hidden border-item-4 pb-2 last:border-b-0 last:pb-px"
+ class="_bg-item-2 _rounded-lg _border-b border-item-4 overflow-hidden pb-2 last:border-b-0 last:pb-px"
>
<div
:class="{ 'border-item-4': isShowGroupSum && groupTrnsIds.length > 1 }"
@@ -318,10 +318,10 @@ function onOpenTrnForm(date: number) {
<!-- Show all -->
<div
v-if="!isShowedAllTrns"
- class="pt-1 px-2"
+ class="px-2 pt-1"
>
<div
- class="flex-center rounded-[var(--ui-radius)] bg-[var(--item-5)] px-5 py-2 text-sm text-muted hover:bg-item-6"
+ class="flex-center text-muted hover:bg-item-6 rounded-[var(--ui-radius)] bg-[var(--item-5)] px-5 py-2 text-sm"
@click="pageNumber = ++pageNumber"
>
{{ t('trns.more') }} {{ paginatedTrnsIds.length }} /
diff --git a/app/components/trns/NoTrns.vue b/app/components/trns/NoTrns.vue
index 7d745624..43ecb01a 100644
--- a/app/components/trns/NoTrns.vue
+++ b/app/components/trns/NoTrns.vue
@@ -1,5 +1,5 @@
<template>
- <div class="flex-center flex gap-2 py-3 text-center text-muted">
+ <div class="flex-center text-muted flex gap-2 py-3 text-center">
<Icon name="lucide:tree-palm" size="22" />
<div class="text-base leading-none">
{{ $t('trns.noTrns') }}
diff --git a/app/components/ui/ButtonWithRight.vue b/app/components/ui/ButtonWithRight.vue
index 57382a0d..dc0a7c48 100644
--- a/app/components/ui/ButtonWithRight.vue
+++ b/app/components/ui/ButtonWithRight.vue
@@ -24,7 +24,7 @@ const emit = defineEmits<{
>
<div
v-if="!props.isShowTitle"
- class="text-sm text-muted"
+ class="text-muted text-sm"
>
<slot name="label" />
</div>
diff --git a/app/components/ui/Checkbox.vue b/app/components/ui/Checkbox.vue
index 508d962b..28a4a94e 100644
--- a/app/components/ui/Checkbox.vue
+++ b/app/components/ui/Checkbox.vue
@@ -25,7 +25,7 @@ function handleClick() {
:value="checkboxValue"
/>
- <div class="grow text-muted">
+ <div class="text-muted grow">
{{ title }}
</div>
</div>
diff --git a/app/components/ui/HeaderTitle.vue b/app/components/ui/HeaderTitle.vue
index 76a952c0..f0626443 100644
--- a/app/components/ui/HeaderTitle.vue
+++ b/app/components/ui/HeaderTitle.vue
@@ -1,8 +1,8 @@
<template>
<div
class="
- @lg:text-xl flex grow items-center gap-2 px-1 pl-2 font-tertiary text-lg font-semibold leading-none
- tracking-wide text-(--ui-text-highlighted)
+ font-tertiary flex grow items-center gap-2 px-1 pl-2 text-lg leading-none font-semibold tracking-wide
+ text-(--ui-text-highlighted) @lg:text-xl
"
>
<slot />
diff --git a/app/components/ui/Logo.vue b/app/components/ui/Logo.vue
index 13de7786..5ff85ab4 100644
--- a/app/components/ui/Logo.vue
+++ b/app/components/ui/Logo.vue
@@ -1,5 +1,5 @@
<template>
- <div class="font-brand text-2xl font-bold first-letter:text-primary">
+ <div class="font-brand first-letter:text-primary text-2xl font-bold">
{{ $t('appName') }}
</div>
</template>
diff --git a/app/components/ui/TabsItem3.vue b/app/components/ui/TabsItem3.vue
index c6ed3711..a8368525 100644
--- a/app/components/ui/TabsItem3.vue
+++ b/app/components/ui/TabsItem3.vue
@@ -13,7 +13,7 @@ const emit = defineEmits(['click'])
:class="[getStyles('item', ['minh2']), {
'!bg-item-4 !text-primary': isActive,
}]"
- class="flex grow select-none items-center justify-center gap-1 px-2 text-sm leading-none text-muted hover:bg-[var(--item-5)]"
+ class="text-muted flex grow items-center justify-center gap-1 px-2 text-sm leading-none select-none hover:bg-[var(--item-5)]"
@click="emit('click')"
>
<slot />
diff --git a/app/components/ui/TabsItem4.vue b/app/components/ui/TabsItem4.vue
index ee459260..0d396c66 100644
--- a/app/components/ui/TabsItem4.vue
+++ b/app/components/ui/TabsItem4.vue
@@ -13,7 +13,7 @@ const emit = defineEmits(['click'])
:class="[getStyles('item', ['link', 'rounded', 'minh3', 'minw2']), {
'!bg-item-4 !text-1': isActive,
}]"
- class="flex shrink-0 items-center justify-center gap-1 rounded-lg border-1 px-3 text-sm leading-none text-muted"
+ class="text-muted flex shrink-0 items-center justify-center gap-1 rounded-lg border-1 px-3 text-sm leading-none"
@click="emit('click')"
>
<slot />
diff --git a/app/components/ui/TextSm1.vue b/app/components/ui/TextSm1.vue
index 14c3f2e1..4764555e 100644
--- a/app/components/ui/TextSm1.vue
+++ b/app/components/ui/TextSm1.vue
@@ -6,7 +6,7 @@ const emit = defineEmits<{
<template>
<div
- class="font-primary text-xs leading-none text-muted"
+ class="font-primary text-muted text-xs leading-none"
@click="(e: Event) => emit('click', e)"
>
<slot />
diff --git a/app/components/ui/TextSm2.vue b/app/components/ui/TextSm2.vue
index 6ddd1a3a..d5b3d4b0 100644
--- a/app/components/ui/TextSm2.vue
+++ b/app/components/ui/TextSm2.vue
@@ -6,7 +6,7 @@ const emit = defineEmits<{
<template>
<div
- class="font-primary text-sm leading-none text-muted"
+ class="font-primary text-muted text-sm leading-none"
@click="(e: Event) => emit('click', e)"
>
<slot />
diff --git a/app/components/ui/Title3.vue b/app/components/ui/Title3.vue
index 33dcc0c8..5eddac60 100644
--- a/app/components/ui/Title3.vue
+++ b/app/components/ui/Title3.vue
@@ -6,7 +6,7 @@ const emit = defineEmits<{
<template>
<div
- class="font-tertiary text-base font-semibold leading-none text-muted"
+ class="font-tertiary text-muted text-base leading-none font-semibold"
@click="(e: Event) => emit('click', e)"
>
<slot />
diff --git a/app/components/ui/Title6.vue b/app/components/ui/Title6.vue
index e360baca..344f863c 100644
--- a/app/components/ui/Title6.vue
+++ b/app/components/ui/Title6.vue
@@ -6,7 +6,7 @@ const emit = defineEmits<{
<template>
<div
- class="text-2xs leading-none text-2 lg:text-sm"
+ class="text-2xs text-2 leading-none lg:text-sm"
@click="(e: Event) => emit('click', e)"
>
<slot />
diff --git a/app/components/ui/TitleDropRight.vue b/app/components/ui/TitleDropRight.vue
index cd3383c6..8d669c93 100644
--- a/app/components/ui/TitleDropRight.vue
+++ b/app/components/ui/TitleDropRight.vue
@@ -18,7 +18,7 @@ const emit = defineEmits<{
<Icon
:name="props.isShown ? 'lucide:chevron-down' : 'lucide:chevron-right'"
size="22"
- class="-ml-1 !text-4"
+ class="!text-4 -ml-1"
/>
<slot />
</div>
diff --git a/app/components/ui/TitleOption.vue b/app/components/ui/TitleOption.vue
index 8901cf0d..c4b81277 100644
--- a/app/components/ui/TitleOption.vue
+++ b/app/components/ui/TitleOption.vue
@@ -6,7 +6,7 @@ const emit = defineEmits<{
<template>
<div
- class="font-tertiary font-semibold leading-none text-muted"
+ class="font-tertiary text-muted leading-none font-semibold"
@click="(e: Event) => emit('click', e)"
>
<slot />
diff --git a/app/components/wallets/CurrenciesToggleDep.vue b/app/components/wallets/CurrenciesToggleDep.vue
index b2ec345d..ede296ee 100644
--- a/app/components/wallets/CurrenciesToggleDep.vue
+++ b/app/components/wallets/CurrenciesToggleDep.vue
@@ -20,7 +20,7 @@ const walletsStore = useWalletsStore()
<UiToggleWithStorage
:initStatus="true"
:lineWidth="0"
- class="@xl/page:max-w-xl grid md:max-w-lg"
+ class="grid md:max-w-lg @xl/page:max-w-xl"
storageKey="finapp-wallets-currencies"
>
<template #header="{ toggle, isShown }">
@@ -33,7 +33,7 @@ const walletsStore = useWalletsStore()
</UiTitle8>
</template>
- <UiTabs2 class="@xl/page:px-0 flex gap-1 px-2">
+ <UiTabs2 class="flex gap-1 px-2 @xl/page:px-0">
<UiTabsItem1
:isActive="currencyFiltered === 'all'"
@click="emit('onSelectFilterCurrency', 'all')"
diff --git a/app/components/wallets/List.vue b/app/components/wallets/List.vue
index a06377af..0176769d 100644
--- a/app/components/wallets/List.vue
+++ b/app/components/wallets/List.vue
@@ -52,7 +52,7 @@ onMounted(() => stateLimit.value = props.limit)
>
<div
:class="getStyles('item', ['rounded', 'minh1', 'link', 'padding1', 'center3'])"
- class="-mt-px text-xs text-muted"
+ class="text-muted -mt-px text-xs"
@click="toggle"
>
<template v-if="stateLimit > 0">
diff --git a/app/components/wallets/Selector.vue b/app/components/wallets/Selector.vue
index f847ea95..bf09276e 100644
--- a/app/components/wallets/Selector.vue
+++ b/app/components/wallets/Selector.vue
@@ -36,7 +36,7 @@ function onClickWallet(walletId: WalletId) {
<template>
<div
- class="grid gap-2 h-full overflow-hidden"
+ class="grid h-full gap-2 overflow-hidden"
:class="{ 'grid-rows-[auto_1fr]': walletsStore.currenciesUsed.length > 1 }"
>
<div
@@ -49,7 +49,7 @@ function onClickWallet(walletId: WalletId) {
/>
</div>
- <div class="overflow-y-auto scrollerBlock h-full py-px">
+ <div class="scrollerBlock h-full overflow-y-auto py-px">
<WalletsItem
v-for="walletId in selectedWalletsIdsWithCurrency"
:key="walletId"
diff --git a/app/components/wallets/Statistics.vue b/app/components/wallets/Statistics.vue
index 82d4149d..756854dd 100644
--- a/app/components/wallets/Statistics.vue
+++ b/app/components/wallets/Statistics.vue
@@ -30,7 +30,7 @@ const itemsGrouped = computed(() => [
:initStatus="true"
:lineWidth="0"
:storageKey="props.storageKey"
- class="mb-2 rounded-xl bg-item-2 md:max-w-lg"
+ class="bg-item-2 mb-2 rounded-xl md:max-w-lg"
>
<template #header="{ toggle, isShown }">
<div class="flex grow items-center justify-between">
@@ -55,7 +55,7 @@ const itemsGrouped = computed(() => [
insideClasses="!min-h-[44px]"
@click="emit('click', item.id)"
>
- <div class="grow pl-1 text-sm leading-none text-muted">
+ <div class="text-muted grow pl-1 text-sm leading-none">
<div>
{{ $t(`money.types.${item.id}`) }}
</div>
@@ -69,7 +69,7 @@ const itemsGrouped = computed(() => [
:currencyCode="currencyCode"
variant="2xs"
/>
- <div class="text-2xs leading-none opacity-70 leading-none">
+ <div class="text-2xs leading-none opacity-70">
/
</div>
<Amount
diff --git a/app/pages/dev.vue b/app/pages/dev.vue
index 0f344a32..0e77f6f8 100644
--- a/app/pages/dev.vue
+++ b/app/pages/dev.vue
@@ -7,55 +7,55 @@
<div class="grid gap-12">
<div>
<!-- Colors -->
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
Colors
</h1>
<div class="grid gap-4">
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Backgrounds
</div>
<div class="flex flex-wrap gap-0">
<div class="flex-center size-20 bg-[var(--item-1)]">
1
</div>
- <div class="flex-center size-20 bg-item-2">
+ <div class="flex-center bg-item-2 size-20">
2
</div>
- <div class="flex-center size-20 bg-item-3">
+ <div class="flex-center bg-item-3 size-20">
3
</div>
- <div class="flex-center size-20 bg-item-4">
+ <div class="flex-center bg-item-4 size-20">
4
</div>
<div class="flex-center size-20 bg-[var(--item-5)]">
5
</div>
- <div class="flex-center size-20 bg-item-6">
+ <div class="flex-center bg-item-6 size-20">
6
</div>
- <div class="flex-center size-20 bg-item-7">
+ <div class="flex-center bg-item-7 size-20">
7
</div>
</div>
</div>
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Texts
</div>
<div class="flex flex-wrap gap-0">
- <div class="flex-center size-20 bg-1 text-icon-primary">
+ <div class="flex-center bg-1 text-icon-primary size-20">
1
</div>
- <div class="flex-center size-20 bg-3">
+ <div class="flex-center bg-3 size-20">
3
</div>
- <div class="flex-center size-20 bg-2">
+ <div class="flex-center bg-2 size-20">
2
</div>
- <div class="flex-center size-20 bg-4">
+ <div class="flex-center bg-4 size-20">
4
</div>
</div>
@@ -63,7 +63,7 @@
<div class="flex flex-wrap gap-4">
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Accent
</div>
<div class="flex flex-wrap gap-0">
@@ -72,40 +72,40 @@
</div>
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Icon primary
</div>
<div class="flex flex-wrap gap-0">
- <div class="flex-center size-20 bg-icon-primary">
+ <div class="flex-center bg-icon-primary size-20">
1
</div>
</div>
</div>
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Alert
</div>
<div class="flex flex-wrap gap-0">
- <div class="size-20 bg-alert-1" />
+ <div class="bg-alert-1 size-20" />
</div>
</div>
<div class="grid gap-2">
- <div class="text-sm text-muted">
+ <div class="text-muted text-sm">
Money
</div>
<div class="flex flex-wrap gap-0">
- <div class="size-20 bg-income-1" />
- <div class="size-20 bg-income-2" />
- <div class="size-20 bg-expense-1" />
- <div class="size-20 bg-expense-2" />
+ <div class="bg-income-1 size-20" />
+ <div class="bg-income-2 size-20" />
+ <div class="bg-expense-1 size-20" />
+ <div class="bg-expense-2 size-20" />
</div>
</div>
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
Chart
</h1>
@@ -121,7 +121,7 @@
<!-- UiTitle -->
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiTitle
</h1>
@@ -153,7 +153,7 @@
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiText
</h1>
@@ -169,7 +169,7 @@
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiToggle
</h1>
@@ -193,7 +193,7 @@
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiItem
</h1>
@@ -213,7 +213,7 @@
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiTabs
</h1>
@@ -229,7 +229,7 @@
</div>
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
UiTabsItem
</h1>
@@ -268,13 +268,13 @@
<div>
<!-- Calendar -->
<div>
- <h1 class="mb-2 border-b border-item-6 pb-1">
+ <h1 class="border-item-6 mb-2 border-b pb-1">
Calendar
</h1>
<div class="grid gap-4">
<UCalendar />
- <div class="h-px bg-muted" />
+ <div class="bg-muted h-px" />
<UCalendar
class="@container/calendar"
:numberOfMonths="2"