Skip to content

Commit 9cb1695

Browse files
committed
fix: update ESLint configuration and improve type error handling in Jest setup
refactor: clean up imports and reformat component props in Card and Colors components
1 parent 1fd9965 commit 9cb1695

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default antfu(
3939
'docs/',
4040
'cli/',
4141
'expo-env.d.ts',
42+
'migration/*',
4243
],
4344
},
4445

@@ -51,7 +52,7 @@ export default antfu(
5152
'react/no-inline-styles': 'off',
5253
'react/destructuring-assignment': 'off',
5354
'react/require-default-props': 'off',
54-
'react-refresh/only-export-components': 'off', // Too strict for React Native
55+
'react-refresh/only-export-components': 'warn', // Too strict for React Native
5556
'unicorn/filename-case': [
5657
'error',
5758
{

jest-setup.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
/* eslint-disable ts/ban-ts-comment */
2+
/* eslint-disable no-restricted-globals */
13
import '@testing-library/react-native/extend-expect';
24

35
// react-hook form setup for testing
4-
// @ts-ignore
6+
// @ts-expect-error
57
global.window = {};
6-
// @ts-ignore
8+
9+
// @ts-expect-error
710
global.window = global;

src/components/card.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import type { Post } from '@/api';
2-
import { Link } from 'expo-router';
32

3+
import { Link } from 'expo-router';
44
import * as React from 'react';
55
import { Image, Pressable, Text, View } from '@/components/ui';
66

7-
type Props = Post;
8-
97
const images = [
108
'https://images.unsplash.com/photo-1489749798305-4fea3ae63d43?auto=format&fit=crop&w=800&q=80',
119
'https://images.unsplash.com/photo-1564507004663-b6dfb3c824d5?auto=format&fit=crop&w=800&q=80',
@@ -14,6 +12,8 @@ const images = [
1412
'https://images.unsplash.com/photo-1587974928442-77dc3e0dba72?auto=format&fit=crop&w=800&q=80',
1513
];
1614

15+
type Props = Post;
16+
1717
export function Card({ title, body, id }: Props) {
1818
return (
1919
<Link href={`/feed/${id}`} asChild>

src/components/colors.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
32
import { Text, View } from '@/components/ui';
43
import colors from '@/components/ui/colors';
54

0 commit comments

Comments
 (0)