Skip to content

Commit ab60437

Browse files
fix: lint errors
1 parent 5e0bd1d commit ab60437

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

__tests__/components/AnimatedNumber.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AnimatedNumber } from '../../src/components/Common/AnimatedNumber'
55
let mockValue = 1000
66
jest.mock('framer-motion', () => ({
77
motion: {
8-
span: ({ children, className, ...props }: any) => (
8+
span: ({ children, className, ...props }: React.ComponentProps<'span'>) => (
99
<span className={className} {...props}>
1010
{children}
1111
</span>

__tests__/components/DelayedLoading.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ jest.mock('../../src/components/Common/Loading', () => ({
99
// Mock framer-motion
1010
jest.mock('framer-motion', () => ({
1111
motion: {
12-
div: ({ children, ...props }: any) => <div {...props}>{children}</div>,
12+
div: ({ children, ...props }: React.ComponentProps<'div'>) => (
13+
<div {...props}>{children}</div>
14+
),
1315
},
14-
AnimatePresence: ({ children }: any) => <>{children}</>,
16+
AnimatePresence: ({ children }: { children: React.ReactNode }) => (
17+
<>{children}</>
18+
),
1519
}))
1620

1721
describe('DelayedLoading Component', () => {

__tests__/components/PlayerInfo.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('PlayerInfo Component', () => {
2727
})
2828

2929
it('should render "Unknown" when name is not provided', () => {
30-
render(<PlayerInfo name={undefined as any} color="white" />)
30+
render(<PlayerInfo name={undefined as unknown as string} color="white" />)
3131

3232
expect(screen.getByText('Unknown')).toBeInTheDocument()
3333
})

__tests__/hooks/useUnload.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe('useUnload', () => {
139139

140140
it('should handle non-function handler gracefully', () => {
141141
// This shouldn't happen in practice, but test for robustness
142-
const handler = null as any
142+
const handler = null as unknown as () => string
143143
renderHook(() => useUnload(handler))
144144

145145
const eventListener = mockAddEventListener.mock.calls[0][1]

0 commit comments

Comments
 (0)