Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(biome): add useSortedClasses linter #206

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/mobile/app/(app)/(tabs)/budgets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default function BudgetsScreen() {
})
}}
>
<Animated.View className="gap-6 py-6 px-6" style={summaryStyle}>
<Animated.View className="gap-6 px-6 py-6" style={summaryStyle}>
<BudgetStatistic totalRemaining={1000} remainingPerDay={100} />
</Animated.View>
<Animated.View
Expand All @@ -174,7 +174,7 @@ export default function BudgetsScreen() {
keyExtractor={(item) => item.id}
renderItem={({ item: budget }) => <BudgetItem budget={budget} />}
renderSectionHeader={({ section: { title } }) => (
<Text className="text-muted-foreground bg-card py-2 px-6">
<Text className="bg-card px-6 py-2 text-muted-foreground">
{title}
</Text>
)}
Expand All @@ -193,7 +193,7 @@ export default function BudgetsScreen() {
colorScheme === 'dark' ? 'transparent' : '#ffffff00',
theme[colorScheme ?? 'light'].background,
]}
className="absolute bottom-0 left-0 right-0 h-36"
className="absolute right-0 bottom-0 left-0 h-36"
pointerEvents="none"
/>
<Toolbar />
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function HomeScreen() {
<TransactionItem transaction={transaction} />
)}
renderSectionHeader={({ section: { title, sum } }) => (
<View className="mx-6 pt-4 flex-row justify-between border-muted-foreground/20 border-b bg-card py-2 align-center">
<View className="mx-6 flex-row justify-between border-muted-foreground/20 border-b bg-card py-2 pt-4 align-center">
<Text className="text-muted-foreground">{title}</Text>
<AmountFormat
amount={sum}
Expand Down
46 changes: 23 additions & 23 deletions apps/mobile/app/(app)/(tabs)/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ export default function SettingsScreen() {
className="bg-card"
>
<ProfileCard />
<Button className="mx-6 !px-4 !h-14 justify-between">
<Button className="!px-4 !h-14 mx-6 justify-between">
<View>
<Text className="font-semibold !text-base">
<Text className="!text-base font-semibold">
{t(i18n)`Get 6pm Pro`}
</Text>
<Text className="font-medium opacity-65 !text-xs">
<Text className="!text-xs font-medium opacity-65">
{t(i18n)`Unlocks full AI power and more!`}
</Text>
</View>
<LockKeyholeIcon className="w-6 h-6 text-muted-foreground" />
<LockKeyholeIcon className="h-6 w-6 text-muted-foreground" />
</Button>
<View className="gap-2 mt-4">
<Text className="font-sans mx-6 text-muted-foreground">
<View className="mt-4 gap-2">
<Text className="mx-6 font-sans text-muted-foreground">
{t(i18n)`General`}
</Text>
<View>
Expand All @@ -67,7 +67,7 @@ export default function SettingsScreen() {
label={t(i18n)`Wallet accounts`}
icon={WalletCardsIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
/>
</Link>
Expand All @@ -76,7 +76,7 @@ export default function SettingsScreen() {
label={t(i18n)`Categories`}
icon={ShapesIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
/>
</Link>
Expand All @@ -85,14 +85,14 @@ export default function SettingsScreen() {
label={t(i18n)`Magic inbox`}
icon={InboxIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
/>
</Link>
</View>
</View>
<View className="gap-2">
<Text className="font-sans mx-6 text-muted-foreground">
<Text className="mx-6 font-sans text-muted-foreground">
{t(i18n)`App settings`}
</Text>
<View>
Expand All @@ -101,7 +101,7 @@ export default function SettingsScreen() {
label={t(i18n)`Appearance`}
icon={SwatchBookIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
/>
</Link>
Expand All @@ -111,10 +111,10 @@ export default function SettingsScreen() {
icon={EarthIcon}
rightSection={
<View className="flex flex-row items-center gap-2">
<Text className="text-muted-foreground font-sans uppercase">
<Text className="font-sans text-muted-foreground uppercase">
{t(i18n)`${language}`}
</Text>
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
</View>
}
/>
Expand All @@ -137,7 +137,7 @@ export default function SettingsScreen() {
</View>
</View>
<View className="gap-2">
<Text className="font-sans mx-6 text-muted-foreground">
<Text className="mx-6 font-sans text-muted-foreground">
{t(i18n)`Others`}
</Text>
<View>
Expand All @@ -146,31 +146,31 @@ export default function SettingsScreen() {
label={t(i18n)`Send feedback`}
icon={MessageSquareQuoteIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
/>
</Link>
<MenuItem
label={t(i18n)`Rate 6pm on App Store`}
icon={StarIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
disabled
/>
<MenuItem
label={t(i18n)`Share with friends`}
icon={Share2Icon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
disabled
/>
<MenuItem
label={t(i18n)`Proudly open source`}
icon={GithubIcon}
rightSection={
<ChevronRightIcon className="w-5 h-5 text-primary" />
<ChevronRightIcon className="h-5 w-5 text-primary" />
}
onPress={() => Linking.openURL('https://github.com/sixpm-ai/6pm')}
/>
Expand All @@ -191,17 +191,17 @@ export default function SettingsScreen() {
},
])
}
className="justify-start gap-6 !px-6"
className="!px-6 justify-start gap-6"
>
<LogOutIcon className="w-5 h-5 text-red-500" />
<Text className="text-red-500 font-normal group-active:text-red-500">
<LogOutIcon className="h-5 w-5 text-red-500" />
<Text className="font-normal text-red-500 group-active:text-red-500">
{t(i18n)`Sign out`}
</Text>
</Button>
</View>
</View>
<View className="items-center gap-3">
<Logo className="w-16 h-16 mx-auto" />
<Logo className="mx-auto h-16 w-16" />
<Text className="font-mono text-muted-foreground text-sm">
{t(i18n)`ver.`}
{Application.nativeApplicationVersion}
Expand All @@ -225,7 +225,7 @@ export default function SettingsScreen() {
colorScheme === 'dark' ? 'transparent' : '#ffffff00',
theme[colorScheme ?? 'light'].background,
]}
className="absolute bottom-0 left-0 right-0 h-20"
className="absolute right-0 bottom-0 left-0 h-20"
pointerEvents="none"
/>
</View>
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/app/(app)/appearance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export default function AppearanceScreen() {

return (
<ScrollView className="bg-card" contentContainerClassName="px-6 py-3">
<Text className="font-sans text-primary font-medium text-base">
<Text className="font-medium font-sans text-base text-primary">
{t(i18n)`App theme`}
</Text>
<Text className="font-sans text-muted-foreground text-sm mb-4">
<Text className="mb-4 font-sans text-muted-foreground text-sm">
{t(i18n)`Choose a preferred theme for the 6pm`}
</Text>
<Tabs
Expand All @@ -25,11 +25,11 @@ export default function AppearanceScreen() {
>
<TabsList>
<TabsTrigger value="light">
<SunIcon className="w-5 h-5 text-muted-foreground" />
<SunIcon className="h-5 w-5 text-muted-foreground" />
<Text>{t(i18n)`Light`}</Text>
</TabsTrigger>
<TabsTrigger value="dark">
<MoonStarIcon className="w-5 h-5 text-muted-foreground" />
<MoonStarIcon className="h-5 w-5 text-muted-foreground" />
<Text>{t(i18n)`Dark`}</Text>
</TabsTrigger>
</TabsList>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/category/[categoryId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function EditCategoryScreen() {

if (!category) {
return (
<View className="flex-1 bg-card items-center justify-center">
<View className="flex-1 items-center justify-center bg-card">
<Text className="text-muted-foreground">Category not found</Text>
</View>
)
Expand Down
12 changes: 6 additions & 6 deletions apps/mobile/app/(app)/category/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ export default function CategoriesScreen() {

return (
<SectionList
className="bg-card flex-1"
className="flex-1 bg-card"
contentContainerStyle={{ paddingBottom: bottom }}
refreshing={isRefetching}
onRefresh={refetch}
sections={sections}
keyExtractor={(item) => item.id}
renderItem={({ item: category }) => <CategoryItem category={category} />}
renderSectionHeader={({ section: { title } }) => (
<Text className="text-muted-foreground mx-6 bg-card py-2">{title}</Text>
<Text className="mx-6 bg-card py-2 text-muted-foreground">{title}</Text>
)}
renderSectionFooter={({ section }) => (
<>
{!section.data.length &&
(isRefetching ? (
<>
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
</>
) : (
<Text className="font-sans text-muted-foreground text-center mt-6 mb-9">
<Text className="mt-6 mb-9 text-center font-sans text-muted-foreground">
{t(i18n)`empty`}
</Text>
))}
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/category/new-category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function CreateCategoryScreen() {
}

return (
<View className="py-3 px-6 bg-card h-screen">
<View className="h-screen bg-card px-6 py-3">
<CategoryForm onSubmit={handleCreate} defaultValues={{ type }} />
</View>
)
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/app/(app)/language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function LanguageScreen() {
label={t(i18n)`English`}
rightSection={
language === 'en' && (
<CheckCircleIcon className="w-5 h-5 text-primary" />
<CheckCircleIcon className="h-5 w-5 text-primary" />
)
}
onPress={() => {
Expand All @@ -29,7 +29,7 @@ export default function LanguageScreen() {
label={t(i18n)`Vietnamese`}
rightSection={
language === 'vi' && (
<CheckCircleIcon className="w-5 h-5 text-primary" />
<CheckCircleIcon className="h-5 w-5 text-primary" />
)
}
onPress={() => {
Expand Down
10 changes: 5 additions & 5 deletions apps/mobile/app/(app)/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ export default function ProfileScreen() {
...user!,
imageUrl: value!,
}}
className="w-20 h-20"
className="h-20 w-20"
/>
)}
/>
</Pressable>
<View>
<Text className="font-sans text-primary font-medium text-base">
<Text className="font-medium font-sans text-base text-primary">
{t(i18n)`Avatar`}
</Text>
<View className="flex-row items-center gap-2">
Expand All @@ -166,7 +166,7 @@ export default function ProfileScreen() {
profileForm.setValue('imageUrl', null, { shouldDirty: true })
}
>
<Trash2Icon className="w-5 h-5 text-primary" />
<Trash2Icon className="h-5 w-5 text-primary" />
</Button>
</View>
</View>
Expand All @@ -190,7 +190,7 @@ export default function ProfileScreen() {
</FormProvider>
<Separator className="mt-20 mb-4" />
<View className="gap-3">
<Text className="font-sans text-primary font-medium text-base">
<Text className="font-medium font-sans text-base text-primary">
{t(i18n)`Danger zone`}
</Text>
<Button
Expand All @@ -202,7 +202,7 @@ export default function ProfileScreen() {
>
<Text>{t(i18n)`Delete 6pm account`}</Text>
</Button>
<Text className="font-sans text-muted-foreground text-sm mb-4">
<Text className="mb-4 font-sans text-muted-foreground text-sm">
{t(i18n)`All your data will be deleted`}
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/transaction/[transactionId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function EditRecordScreen() {

if (!transaction) {
return (
<View className="flex-1 items-center bg-muted justify-center">
<View className="flex-1 items-center justify-center bg-muted">
<LoaderIcon className="size-7 animate-spin text-primary" />
</View>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/transaction/new-record.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function NewRecordScreen() {

if (!defaultWallet) {
return (
<View className="flex-1 items-center bg-muted justify-center">
<View className="flex-1 items-center justify-center bg-muted">
<LoaderIcon className="size-7 animate-spin text-primary" />
</View>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/wallet/[walletId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function EditAccountScreen() {

return (
<ScrollView
className="bg-card flex-1"
className="flex-1 bg-card"
contentContainerClassName="gap-4 p-6"
automaticallyAdjustKeyboardInsets
keyboardShouldPersistTaps="handled"
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/app/(app)/wallet/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export default function WalletAccountsScreen() {
ListEmptyComponent={
isLoading ? (
<>
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mb-5 mt-3 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
<Skeleton className="mx-6 mt-3 mb-5 h-4 rounded-full" />
</>
) : (
<Text className="font-sans text-muted-foreground text-center mt-6 mb-9">
<Text className="mt-6 mb-9 text-center font-sans text-muted-foreground">
{t(i18n)`empty`}
</Text>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/wallet/new-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function NewAccountScreen() {

return (
<ScrollView
className="bg-card flex-1"
className="flex-1 bg-card"
contentContainerClassName="gap-4 p-6"
automaticallyAdjustKeyboardInsets
keyboardShouldPersistTaps="handled"
Expand Down
Loading