Skip to content

Commit 1a517a1

Browse files
committed
chore: update package.json with yarn package manager and add test path to eslint config
fix: correct import order in Skeleton test file and update yarn.lock for package resolutions
1 parent 7a8abde commit 1a517a1

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"dependencies": {
2828
"kleur": "^4.1.4",
2929
"prompts": "^2.4.1"
30-
}
30+
},
31+
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
3132
}

template/eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export default tseslint.config(
7878
hooks: '@/hooks(/.+)?',
7979
navigation: '@/navigation(/.+)?',
8080
screens: '@/screens(/.+)?',
81+
test: '@/test(/.+)?',
8182
theme: '@/theme(/.+)?',
8283
translations: '@/translations(/.+)?',
8384
},
@@ -88,6 +89,7 @@ export default tseslint.config(
8889
['builtin', 'external'],
8990
['theme', 'hooks', 'navigation', 'translations'],
9091
['components', 'screens'],
92+
['test'],
9193
'internal',
9294
'unknown',
9395
],

template/src/components/atoms/IconByVariant/IconByVariant.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ReactElement } from 'react';
2-
import type { Shape, SvgProps } from 'react-native-svg';
2+
import type { SvgProps } from 'react-native-svg';
33

44
import { useMemo } from 'react';
55
import * as z from 'zod';
@@ -29,7 +29,7 @@ function IconByVariant({
2929
const getDefaultSource = () =>
3030
z
3131
.object({
32-
default: z.custom<Shape<SvgProps>>(() =>
32+
default: z.custom<React.FC<SvgProps>>(() =>
3333
z.custom<ReactElement<SvgProps>>(),
3434
),
3535
})
@@ -42,7 +42,7 @@ function IconByVariant({
4242
try {
4343
const fetchedModule = z
4444
.object({
45-
default: z.custom<Shape<SvgProps>>(() =>
45+
default: z.custom<React.FC<SvgProps>>(() =>
4646
z.custom<ReactElement<SvgProps>>(),
4747
),
4848
})

template/src/components/atoms/Skeleton/Skeleton.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import TestAppWrapper from '@/tests/TestAppWrapper';
21
import { render, screen } from '@testing-library/react-native';
32
import { Text } from 'react-native';
43

4+
import TestAppWrapper from '@/tests/TestAppWrapper';
5+
56
import SkeletonLoader from './Skeleton';
67

78
const WAIT = 800;

template/src/tests/TestAppWrapper.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { queryClient, storage } from '@/App';
21
import { QueryClientProvider } from '@tanstack/react-query';
32
import { type PropsWithChildren } from 'react';
43
import { GestureHandlerRootView } from 'react-native-gesture-handler';
54

65
import { ThemeProvider } from '@/theme';
76
import '@/translations';
87

8+
import { queryClient, storage } from '../App';
9+
910
function TestAppWrapper({ children }: PropsWithChildren) {
1011
return (
1112
<GestureHandlerRootView>

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44

55
kleur@^3.0.3:
66
version "3.0.3"
7-
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
7+
resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz"
88
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
99

1010
kleur@^4.1.4:
1111
version "4.1.5"
12-
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780"
12+
resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz"
1313
integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==
1414

1515
prompts@^2.4.1:
1616
version "2.4.2"
17-
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
17+
resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz"
1818
integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
1919
dependencies:
2020
kleur "^3.0.3"
2121
sisteransi "^1.0.5"
2222

2323
sisteransi@^1.0.5:
2424
version "1.0.5"
25-
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
25+
resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz"
2626
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==

0 commit comments

Comments
 (0)