Skip to content

Commit

Permalink
Restrict usage of 'react-native-animatable' in favor of 'react-native…
Browse files Browse the repository at this point in the history
…-reanimated'
  • Loading branch information
blazejkustra committed Jan 17, 2025
1 parent 11df78d commit b6eaff0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ const restrictedImportPaths = [
importNames: ['memoize'],
message: "Please use '@src/libs/memoize' instead.",
},
{
name: 'react-native-animatable',
message: "Please use 'react-native-reanimated' instead.",
},
];

const restrictedImportPatterns = [
Expand Down
4 changes: 1 addition & 3 deletions src/components/AnimatedStep/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {useMemo} from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
// eslint-disable-next-line no-restricted-imports -- will be removed in the future PR
import * as Animatable from 'react-native-animatable';
import useThemeStyles from '@hooks/useThemeStyles';
import useNativeDriver from '@libs/useNativeDriver';
import CONST from '@src/CONST';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import type {AnimationDirection} from './AnimatedStepContext';
Expand Down Expand Up @@ -37,8 +37,6 @@ function AnimatedStep({onAnimationEnd, direction = CONST.ANIMATION_DIRECTION.IN,
}}
duration={CONST.ANIMATED_TRANSITION}
animation={animationStyle}
// eslint-disable-next-line react-compiler/react-compiler
useNativeDriver={useNativeDriver}
style={style}
>
{children}
Expand Down
1 change: 1 addition & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import lodashClamp from 'lodash/clamp';
import type {LineLayer} from 'react-map-gl';
import type {Animated, ImageStyle, TextStyle, ViewStyle} from 'react-native';
import {Platform, StyleSheet} from 'react-native';
// eslint-disable-next-line no-restricted-imports -- will be removed in the future PR
import type {CustomAnimation} from 'react-native-animatable';
import type {PickerStyle} from 'react-native-picker-select';
import type {SharedValue} from 'react-native-reanimated';
Expand Down

0 comments on commit b6eaff0

Please sign in to comment.