Skip to content

Commit

Permalink
fix: resolve tsc discrepancy
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaup committed Oct 13, 2024
1 parent 55258b6 commit c3b9b5c
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint --ignore-pattern "example/"
run: yarn lint

- name: Typecheck files
run: yarn typecheck
Expand Down
1 change: 1 addition & 0 deletions example/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { Stack } from 'expo-router';

export default function Layout() {
Expand Down
1 change: 1 addition & 0 deletions example/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { Stack } from 'expo-router';
import {
Dimensions,
Expand Down
3 changes: 2 additions & 1 deletion example/app/scrollviews/nocontext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ScrollView, StyleSheet, Text } from 'react-native';
import React from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import { Blocks } from '../../components/blocks/Blocks';

export default function NoContext() {
Expand Down
3 changes: 1 addition & 2 deletions example/app/scrollviews/vertical.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useRef } from 'react';

import React, { useRef } from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import {
LazyScrollView,
Expand Down
3 changes: 1 addition & 2 deletions example/components/blocks/Blocks.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useCallback } from 'react';

import { chunk } from 'lodash';
import shuffle from 'lodash/shuffle';
import React, { useCallback } from 'react';
import {
Dimensions,
ImageSourcePropType,
Expand Down
2 changes: 1 addition & 1 deletion example/components/blocks/FireOnceBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentProps, useMemo, useState } from 'react';
import React, { ComponentProps, useMemo, useState } from 'react';
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native';
import { LazyChild } from 'react-native-lazy-scrollview';
import { SQUARE_SIZE } from '../../constants';
Expand Down
2 changes: 1 addition & 1 deletion example/components/blocks/ImageBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentProps, useState } from 'react';
import React, { ComponentProps, useState } from 'react';
import {
ActivityIndicator,
Image,
Expand Down
1 change: 1 addition & 0 deletions example/components/blocks/NoLazyChild.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { SQUARE_SIZE } from '../../constants';

Expand Down
1 change: 1 addition & 0 deletions example/components/cards/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useRouter } from 'expo-router';
import React from 'react';
import {
Image,
StyleSheet,
Expand Down
4 changes: 3 additions & 1 deletion example/components/cards/HorizontalCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import React, { useEffect } from 'react';
import {
interpolate,
useAnimatedStyle,
Expand All @@ -14,7 +14,9 @@ export function HorizontalCard() {

useEffect(() => {
animation.value = withRepeat(withTiming(1, { duration: 1000 }), -1, true);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const animatedStyle = useAnimatedStyle(() => {
return {
marginTop: 16,
Expand Down
3 changes: 2 additions & 1 deletion example/components/cards/NoLazyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import React, { useEffect } from 'react';
import {
interpolate,
useAnimatedStyle,
Expand All @@ -14,6 +14,7 @@ export function NoLazyCard() {

useEffect(() => {
animation.value = withRepeat(withTiming(1, { duration: 2000 }), -1);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const animatedStyle = useAnimatedStyle(() => {
Expand Down
3 changes: 2 additions & 1 deletion example/components/cards/VerticalCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import React, { useEffect } from 'react';
import {
interpolate,
useAnimatedStyle,
Expand All @@ -14,6 +14,7 @@ export function VerticalCard() {

useEffect(() => {
animation.value = withRepeat(withTiming(1, { duration: 1000 }), -1, true);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const animatedStyle = useAnimatedStyle(() => {
return {
Expand Down
8 changes: 1 addition & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@
"@babel/core": "^7.24.0",
"@expo/webpack-config": "~19.0.1",
"@types/lodash": "^4.14.194",
"@types/react": "~18.2.79",
"babel-loader": "^8.1.0",
"babel-plugin-module-resolver": "^4.1.0"
},
"private": true,
"eslintConfig": {
"rules": {
"react/react-in-jsx-scope": "off"
}
}
"private": true
}
4 changes: 1 addition & 3 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../tsconfig",
"compilerOptions": {
"jsx": "react-jsx"
}
"compilerOptions": {}
}
18 changes: 0 additions & 18 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2670,11 +2670,6 @@
dependencies:
undici-types "~5.26.4"

"@types/prop-types@*":
version "15.7.13"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.13.tgz#2af91918ee12d9d32914feb13f5326658461b451"
integrity sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==

"@types/qs@*":
version "6.9.16"
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.16.tgz#52bba125a07c0482d26747d5d4947a64daf8f794"
Expand All @@ -2685,14 +2680,6 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==

"@types/react@~18.2.79":
version "18.2.79"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.79.tgz#c40efb4f255711f554d47b449f796d1c7756d865"
integrity sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==
dependencies:
"@types/prop-types" "*"
csstype "^3.0.2"

"@types/[email protected]":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d"
Expand Down Expand Up @@ -4124,11 +4111,6 @@ csso@^4.2.0:
dependencies:
css-tree "^1.1.2"

csstype@^3.0.2:
version "3.1.3"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

dag-map@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-1.0.2.tgz#e8379f041000ed561fc515475c1ed2c85eece8d7"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"@testing-library/jest-native": "^5.4.1",
"@testing-library/react-native": "^12.0.0-rc.0",
"@types/jest": "^28.1.2",
"@types/react": "~17.0.21",
"@types/react-native": "0.70.0",
"commitlint": "^17.0.2",
"del-cli": "^5.0.0",
Expand Down
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2553,15 +2553,6 @@
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/react@~17.0.21":
version "17.0.53"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.53.tgz#10d4d5999b8af3d6bc6a9369d7eb953da82442ab"
integrity sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
Expand Down

0 comments on commit c3b9b5c

Please sign in to comment.