Skip to content

Commit

Permalink
chore: fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Oct 3, 2024
1 parent fef1a18 commit b6e405b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
"types": "lib/typescript/index.d.ts",
"react-native": "src/index.ts",
"source": "src/index.ts",
"files": [
"src",
"lib",
"mock.js"
],
"files": ["src", "lib", "mock.js"],
"keywords": [
"react-native",
"ios",
Expand All @@ -28,7 +24,7 @@
"bugs": {
"url": "https://github.com/gorhom/react-native-bottom-sheet/issues"
},
"homepage": "https://ui.gorhom.dev/components/bottom-sheet",
"homepage": "https://gorhom.dev/react-native-bottom-sheet/",
"scripts": {
"typescript": "tsc --skipLibCheck --noEmit",
"lint": "biome lint --error-on-warnings ./src",
Expand Down Expand Up @@ -83,10 +79,6 @@
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
"typescript"
]
"targets": ["commonjs", "module", "typescript"]
}
}
1 change: 0 additions & 1 deletion src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import {
DEFAULT_ANIMATE_ON_MOUNT,
DEFAULT_DYNAMIC_SIZING,
DEFAULT_ENABLE_CONTENT_PANNING_GESTURE,
DEFAULT_ENABLE_HANDLE_PANNING_GESTURE,
DEFAULT_ENABLE_OVER_DRAG,
DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE,
DEFAULT_KEYBOARD_BEHAVIOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function BottomSheetRefreshControlComponent({
? Gesture.Native()
// @ts-ignore
.simultaneousWithExternalGesture(
draggableGesture,
scrollableGesture
...draggableGesture.toGestureArray(),
...scrollableGesture.toGestureArray()
)
.shouldCancelWhenOutside(true)
: undefined,
Expand Down
5 changes: 1 addition & 4 deletions src/components/bottomSheetScrollable/BottomSheetFlatList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type ComponentProps, memo } from 'react';
import {
FlatList as RNFlatList,
type FlatListProps as RNFlatListProps,
} from 'react-native';
import { FlatList as RNFlatList } from 'react-native';
import Animated from 'react-native-reanimated';
import { SCROLLABLE_TYPE } from '../../constants';
import { createBottomSheetScrollableComponent } from './createBottomSheetScrollableComponent';
Expand Down
14 changes: 10 additions & 4 deletions src/hooks/useGestureHandler.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import {
type GestureStateChangeEvent,
type GestureUpdateEvent,
type PanGestureChangeEventPayload,
type PanGestureHandlerEventPayload,
State,
} from 'react-native-gesture-handler';
import type Animated from 'react-native-reanimated';
import type { SharedValue } from 'react-native-reanimated';
import { useWorkletCallback } from 'react-native-reanimated';
import { GESTURE_SOURCE } from '../constants';
import type {
Expand All @@ -13,8 +15,8 @@ import type {

export const useGestureHandler: GestureHandlersHookType = (
source: GESTURE_SOURCE,
state: Animated.SharedValue<State>,
gestureSource: Animated.SharedValue<GESTURE_SOURCE>,
state: SharedValue<State>,
gestureSource: SharedValue<GESTURE_SOURCE>,
onStart: GestureEventHandlerCallbackType,
onChange: GestureEventHandlerCallbackType,
onEnd: GestureEventHandlerCallbackType,
Expand All @@ -32,7 +34,11 @@ export const useGestureHandler: GestureHandlersHookType = (
);

const handleOnChange = useWorkletCallback(
(event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
(
event: GestureUpdateEvent<
PanGestureHandlerEventPayload & PanGestureChangeEventPayload
>
) => {
if (gestureSource.value !== source) {
return;
}
Expand Down

0 comments on commit b6e405b

Please sign in to comment.