Skip to content

Commit 666333c

Browse files
maximcodingclaude
andcommitted
fix(lint): apply biome format fixes across changed files
Auto-fix 17 files: import organization, trailing commas, line wrapping. Zero lint errors, zero type errors, 41 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d5e24b3 commit 666333c

File tree

17 files changed

+336
-166
lines changed

17 files changed

+336
-166
lines changed

assets/icons.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
21
// AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
32
// Run: npm run gen:icons
43

5-
import Check from '@assets/svgs/check.svg';
6-
import Globe from '@assets/svgs/globe.svg';
7-
import Home from '@assets/svgs/home.svg';
8-
import Info from '@assets/svgs/info.svg';
9-
import Layers from '@assets/svgs/layers.svg';
10-
import Logout from '@assets/svgs/logout.svg';
11-
import Moon from '@assets/svgs/moon.svg';
12-
import Settings from '@assets/svgs/settings.svg';
13-
import Sun from '@assets/svgs/sun.svg';
14-
import User from '@assets/svgs/user.svg';
15-
4+
import Check from '@assets/svgs/check.svg'
5+
import Globe from '@assets/svgs/globe.svg'
6+
import Home from '@assets/svgs/home.svg'
7+
import Info from '@assets/svgs/info.svg'
8+
import Layers from '@assets/svgs/layers.svg'
9+
import Logout from '@assets/svgs/logout.svg'
10+
import Moon from '@assets/svgs/moon.svg'
11+
import Settings from '@assets/svgs/settings.svg'
12+
import Sun from '@assets/svgs/sun.svg'
13+
import User from '@assets/svgs/user.svg'
1614

1715
export enum IconName {
1816
CHECK = 'CHECK',
@@ -25,7 +23,6 @@ export enum IconName {
2523
SETTINGS = 'SETTINGS',
2624
SUN = 'SUN',
2725
USER = 'USER',
28-
2926
}
3027

3128
export const AppIcon = {
@@ -39,7 +36,6 @@ export const AppIcon = {
3936
[IconName.SETTINGS]: Settings,
4037
[IconName.SUN]: Sun,
4138
[IconName.USER]: User,
39+
} as const
4240

43-
} as const;
44-
45-
export type IconNameType = keyof typeof AppIcon;
41+
export type IconNameType = keyof typeof AppIcon

jest.setup.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ jest.mock('react-native-mmkv', () => {
113113
jest.mock('react-native-webview', () => {
114114
const React = require('react')
115115
const { View } = require('react-native')
116-
const WebView = React.forwardRef((props, _ref) => React.createElement(View, props))
116+
const WebView = React.forwardRef((props, _ref) =>
117+
React.createElement(View, props),
118+
)
117119
WebView.displayName = 'WebView'
118120
return { __esModule: true, default: WebView }
119121
})

src/config/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export const constants = {
2020

2121
/** MMKV key (`navigationStorage`) for persisted React Navigation root state. */
2222
NAVIGATION_STATE_V1: 'navigation.state.v1',
23-
2423
}
2524

2625
export const flags = {

src/features/auth/screens/AuthScreen.tsx

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,12 @@ export default function AuthScreen() {
555555
<Text
556556
style={[
557557
ty.bodyMedium,
558-
{ color: c.textTertiary, marginTop: sp.xs, textAlign: 'center', alignSelf: 'stretch' },
558+
{
559+
color: c.textTertiary,
560+
marginTop: sp.xs,
561+
textAlign: 'center',
562+
alignSelf: 'stretch',
563+
},
559564
]}
560565
>
561566
{t('auth.subtitle')}
@@ -592,9 +597,24 @@ export default function AuthScreen() {
592597
]}
593598
>
594599
{[
595-
{ key: 'google' as const, Icon: <GoogleIcon />, label: 'Google', press: social0 },
596-
{ key: 'facebook' as const, Icon: <FacebookIcon />, label: 'Facebook', press: social1 },
597-
{ key: 'apple' as const, Icon: <AppleIcon color={c.textPrimary} />, label: 'Apple', press: social2 },
600+
{
601+
key: 'google' as const,
602+
Icon: <GoogleIcon />,
603+
label: 'Google',
604+
press: social0,
605+
},
606+
{
607+
key: 'facebook' as const,
608+
Icon: <FacebookIcon />,
609+
label: 'Facebook',
610+
press: social1,
611+
},
612+
{
613+
key: 'apple' as const,
614+
Icon: <AppleIcon color={c.textPrimary} />,
615+
label: 'Apple',
616+
press: social2,
617+
},
598618
].map(({ key, Icon, label, press }) => (
599619
<TouchableOpacity
600620
key={key}
@@ -616,7 +636,9 @@ export default function AuthScreen() {
616636
]}
617637
>
618638
{Icon}
619-
<Text style={[ty.labelSmall, { color: c.textSecondary }]}>{label}</Text>
639+
<Text style={[ty.labelSmall, { color: c.textSecondary }]}>
640+
{label}
641+
</Text>
620642
</Animated.View>
621643
</TouchableOpacity>
622644
))}

src/features/home/screens/HomeScreen.tsx

Lines changed: 132 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// src/features/home/screens/HomeScreen.tsx
22

3-
import { FlashList } from '@shopify/flash-list'
43
import { useNavigation } from '@react-navigation/native'
54
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
5+
import { FlashList } from '@shopify/flash-list'
66
import React, { memo, useCallback, useEffect, useRef } from 'react'
77
import { Animated, Platform, Pressable, ScrollView, View } from 'react-native'
88
import { useFeedQuery } from '@/features/home/hooks/useFeedQuery'
@@ -26,8 +26,16 @@ function useShimmer() {
2626
useEffect(() => {
2727
const loop = Animated.loop(
2828
Animated.sequence([
29-
Animated.timing(anim, { toValue: 1, duration: 750, useNativeDriver: true }),
30-
Animated.timing(anim, { toValue: 0.4, duration: 750, useNativeDriver: true }),
29+
Animated.timing(anim, {
30+
toValue: 1,
31+
duration: 750,
32+
useNativeDriver: true,
33+
}),
34+
Animated.timing(anim, {
35+
toValue: 0.4,
36+
duration: 750,
37+
useNativeDriver: true,
38+
}),
3139
]),
3240
)
3341
loop.start()
@@ -56,9 +64,30 @@ function SkeletonCard({ shimmer }: { shimmer: Animated.Value }) {
5664
}}
5765
>
5866
<Animated.View style={{ opacity: shimmer, gap: sp.xs }}>
59-
<View style={{ height: 15, width: '85%', borderRadius: r.sm, backgroundColor: c.surfaceSecondary }} />
60-
<View style={{ height: 13, width: '60%', borderRadius: r.sm, backgroundColor: c.surfaceSecondary }} />
61-
<View style={{ height: 11, width: '45%', borderRadius: r.sm, backgroundColor: c.surfaceSecondary }} />
67+
<View
68+
style={{
69+
height: 15,
70+
width: '85%',
71+
borderRadius: r.sm,
72+
backgroundColor: c.surfaceSecondary,
73+
}}
74+
/>
75+
<View
76+
style={{
77+
height: 13,
78+
width: '60%',
79+
borderRadius: r.sm,
80+
backgroundColor: c.surfaceSecondary,
81+
}}
82+
/>
83+
<View
84+
style={{
85+
height: 11,
86+
width: '45%',
87+
borderRadius: r.sm,
88+
backgroundColor: c.surfaceSecondary,
89+
}}
90+
/>
6291
</Animated.View>
6392
</View>
6493
)
@@ -74,7 +103,10 @@ function HomeScreenSkeleton() {
74103
return (
75104
<ScrollView
76105
scrollEnabled={false}
77-
contentContainerStyle={{ paddingBottom: TAB_BAR_CLEARANCE, backgroundColor: c.background }}
106+
contentContainerStyle={{
107+
paddingBottom: TAB_BAR_CLEARANCE,
108+
backgroundColor: c.background,
109+
}}
78110
showsVerticalScrollIndicator={false}
79111
>
80112
{/* Greeting */}
@@ -87,8 +119,22 @@ function HomeScreenSkeleton() {
87119
gap: sp.xs,
88120
}}
89121
>
90-
<View style={{ height: 12, width: 100, borderRadius: r.sm, backgroundColor: c.surfaceSecondary }} />
91-
<View style={{ height: 28, width: 200, borderRadius: r.md, backgroundColor: c.surfaceSecondary }} />
122+
<View
123+
style={{
124+
height: 12,
125+
width: 100,
126+
borderRadius: r.sm,
127+
backgroundColor: c.surfaceSecondary,
128+
}}
129+
/>
130+
<View
131+
style={{
132+
height: 28,
133+
width: 200,
134+
borderRadius: r.md,
135+
backgroundColor: c.surfaceSecondary,
136+
}}
137+
/>
92138
</Animated.View>
93139

94140
{/* Section header */}
@@ -129,10 +175,14 @@ function accentColor(
129175
c: ReturnType<typeof useTheme>['theme']['colors'],
130176
): string {
131177
switch (type) {
132-
case 'success': return c.success
133-
case 'primary': return c.primary
134-
case 'info': return c.info
135-
case 'warning': return c.warning
178+
case 'success':
179+
return c.success
180+
case 'primary':
181+
return c.primary
182+
case 'info':
183+
return c.info
184+
case 'warning':
185+
return c.warning
136186
}
137187
}
138188

@@ -154,9 +204,18 @@ function GreetingSection({
154204
})
155205

156206
return (
157-
<View style={{ paddingHorizontal: sp.lg, paddingTop: sp.lg, paddingBottom: sp.md, gap: sp.xxs }}>
207+
<View
208+
style={{
209+
paddingHorizontal: sp.lg,
210+
paddingTop: sp.lg,
211+
paddingBottom: sp.md,
212+
gap: sp.xxs,
213+
}}
214+
>
158215
<Text style={[ty.bodySmall, { color: c.textTertiary }]}>{today}</Text>
159-
<Text style={[ty.displaySmall, { color: c.textPrimary }]}>{t(greetingKey)}</Text>
216+
<Text style={[ty.displaySmall, { color: c.textPrimary }]}>
217+
{t(greetingKey)}
218+
</Text>
160219
</View>
161220
)
162221
}
@@ -192,7 +251,9 @@ function SectionHeader({
192251
style={{
193252
flexDirection: 'row',
194253
alignItems: 'center',
195-
backgroundColor: sublabelIsOffline ? c.warning + '22' : c.success + '22',
254+
backgroundColor: sublabelIsOffline
255+
? c.warning + '22'
256+
: c.success + '22',
196257
borderRadius: r.pill,
197258
paddingHorizontal: sp.xs,
198259
paddingVertical: 2,
@@ -207,7 +268,12 @@ function SectionHeader({
207268
backgroundColor: sublabelIsOffline ? c.warning : c.success,
208269
}}
209270
/>
210-
<Text style={[ty.labelSmall, { color: sublabelIsOffline ? c.warning : c.success }]}>
271+
<Text
272+
style={[
273+
ty.labelSmall,
274+
{ color: sublabelIsOffline ? c.warning : c.success },
275+
]}
276+
>
211277
{sublabel}
212278
</Text>
213279
</View>
@@ -254,35 +320,61 @@ const StoryCard = memo(function StoryCard({ item }: { item: FeedItem }) {
254320
paddingHorizontal: sp.md,
255321
paddingVertical: sp.md,
256322
gap: sp.xs,
257-
...Platform.select({ ios: { ...theme.elevation.card }, android: { elevation: 1 } }),
323+
...Platform.select({
324+
ios: { ...theme.elevation.card },
325+
android: { elevation: 1 },
326+
}),
258327
})}
259328
>
260329
<Text
261-
style={[ty.titleSmall, { color: c.textPrimary, lineHeight: ty.titleSmall.fontSize * 1.35 }]}
330+
style={[
331+
ty.titleSmall,
332+
{ color: c.textPrimary, lineHeight: ty.titleSmall.fontSize * 1.35 },
333+
]}
262334
numberOfLines={2}
263335
>
264336
{item.title}
265337
</Text>
266338

267339
<View style={{ flexDirection: 'row', alignItems: 'center', gap: sp.xs }}>
268-
<View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: accent }} />
269-
<Text style={[ty.labelSmall, { color: c.textTertiary, flex: 1 }]} numberOfLines={1}>
340+
<View
341+
style={{
342+
width: 6,
343+
height: 6,
344+
borderRadius: 3,
345+
backgroundColor: accent,
346+
}}
347+
/>
348+
<Text
349+
style={[ty.labelSmall, { color: c.textTertiary, flex: 1 }]}
350+
numberOfLines={1}
351+
>
270352
{item.subtitle}
271353
</Text>
272354
{item.points != null && (
273355
<>
274-
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{'·'}</Text>
275-
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{`▲ ${item.points}`}</Text>
356+
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>
357+
{'·'}
358+
</Text>
359+
<Text
360+
style={[ty.labelSmall, { color: c.textTertiary }]}
361+
>{`▲ ${item.points}`}</Text>
276362
</>
277363
)}
278364
{item.numComments != null && (
279365
<>
280-
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{'·'}</Text>
281-
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{`${item.numComments} comments`}</Text>
366+
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>
367+
{'·'}
368+
</Text>
369+
<Text
370+
style={[ty.labelSmall, { color: c.textTertiary }]}
371+
>{`${item.numComments} comments`}</Text>
282372
</>
283373
)}
284374
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{'·'}</Text>
285-
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>{item.time}</Text>
375+
<Text style={[ty.labelSmall, { color: c.textTertiary }]}>
376+
{item.time}
377+
</Text>
286378
</View>
287379
</Pressable>
288380
)
@@ -295,13 +387,23 @@ export default function HomeScreen() {
295387
const c = theme.colors
296388
const greetingKey = useGreetingKey()
297389

298-
const { feed, isLoading: feedLoading, isRefetching, refetch, hasCache, syncedAtLabel } =
299-
useFeedQuery()
390+
const {
391+
feed,
392+
isLoading: feedLoading,
393+
isRefetching,
394+
refetch,
395+
hasCache,
396+
syncedAtLabel,
397+
} = useFeedQuery()
300398
const { isOffline } = useOnlineStatus()
301399

302400
const sublabel = isOffline
303-
? syncedAtLabel ? `Offline · ${syncedAtLabel}` : 'Offline'
304-
: syncedAtLabel ? `Synced ${syncedAtLabel}` : null
401+
? syncedAtLabel
402+
? `Offline · ${syncedAtLabel}`
403+
: 'Offline'
404+
: syncedAtLabel
405+
? `Synced ${syncedAtLabel}`
406+
: null
305407

306408
const ListHeader = useCallback(
307409
() => (

0 commit comments

Comments
 (0)