Skip to content

Commit 369929f

Browse files
committed
Fix checks
1 parent 6f982a8 commit 369929f

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

example/babel.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* @type {import('@babel/core').TransformOptions}
33
*/
44
module.exports = {
5-
presets: ["@rnx-kit/babel-preset-metro-react-native"],
65
// added reanimated plugin
76
// https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#step-2-add-reanimateds-babel-plugin
87
plugins: [
98
// '@babel/plugin-proposal-export-namespace-from', // -> for web support
10-
'react-native-reanimated/plugin',
11-
]
9+
"react-native-reanimated/plugin",
10+
],
11+
presets: ["@rnx-kit/babel-preset-metro-react-native"],
1212
};

example/metro.config.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { makeMetroConfig } = require("@rnx-kit/metro-config");
33
const MetroSymlinksResolver = require("@rnx-kit/metro-resolver-symlinks");
44
const {
55
wrapWithReanimatedMetroConfig,
6-
} = require('react-native-reanimated/metro-config');
6+
} = require("react-native-reanimated/metro-config");
77

88
/**
99
* Metro configuration
@@ -17,8 +17,8 @@ const config = makeMetroConfig({
1717
},
1818
});
1919

20-
// maybe needs to wrap metro config with reanimated wrapper
20+
// may need to wrap metro config with reanimated wrapper
2121
// https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#step-3-wrap-metro-config-with-reanimated-wrapper-recommended
2222
module.exports = wrapWithReanimatedMetroConfig(
23-
mergeConfig(getDefaultConfig(__dirname), config)
23+
mergeConfig(getDefaultConfig(__dirname), config),
2424
);

example/src/App.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import dedent from "dedent";
22
import React, { ReactElement, useCallback, useMemo, useRef } from "react";
3-
import { Alert, Animated as VanillaAnimated, Button, Dimensions, SafeAreaView, Text } from "react-native";
4-
import {
5-
AttachStep,
6-
SpotlightTourProvider,
7-
StopParams,
8-
TourBox,
9-
TourStep,
10-
} from "react-native-spotlight-tour";
3+
import { Alert, Button, Dimensions, SafeAreaView, Text, Animated as VanillaAnimated } from "react-native";
4+
import { Text as TextPaper } from "react-native-paper";
5+
import Animated, { useSharedValue, withSpring } from "react-native-reanimated";
6+
import { AttachStep, SpotlightTourProvider, StopParams, TourBox, TourStep } from "react-native-spotlight-tour";
117

128
import {
139
BoldText,
@@ -18,8 +14,6 @@ import {
1814
TitleText,
1915
} from "./App.styles";
2016
import { DocsTooltip } from "./DocsTooltip";
21-
import { Text as TextPaper } from 'react-native-paper';
22-
import Animated, { useSharedValue, withSpring } from "react-native-reanimated";
2317

2418
export function App(): ReactElement {
2519
const gap = useRef(new VanillaAnimated.Value(0)).current;
@@ -108,8 +102,8 @@ export function App(): ReactElement {
108102
}, {
109103
before() {
110104
return new Promise<void>(resolve => {
111-
reanimatedGap.value = withSpring(Dimensions.get("screen").height * 0.24)
112-
return resolve()
105+
reanimatedGap.value = withSpring(Dimensions.get("screen").height * 0.24);
106+
return resolve();
113107
});
114108
},
115109
render: ({ previous, stop }) => (
@@ -191,15 +185,17 @@ export function App(): ReactElement {
191185
</DescriptionText>
192186
</SectionContainerView>
193187
</VanillaAnimated.View>
194-
<Animated.View style={[{transform: [{translateY: reanimatedGap}]}]}>
188+
<Animated.View style={[{ transform: [{ translateY: reanimatedGap }] }]}>
195189
<SectionContainerView>
196190
<AttachStep index={4}>
197-
<TextPaper variant="titleMedium">{"Use it with your favorite libraries!"}</TextPaper>
191+
<TextPaper variant="titleMedium">
192+
{"Use it with your favorite libraries!"}
193+
</TextPaper>
198194
</AttachStep>
199195
<DescriptionText>
200196
{"It supports other animation and design libraries"}
201197
</DescriptionText>
202-
</SectionContainerView>
198+
</SectionContainerView>
203199
</Animated.View>
204200
</>
205201
)}

0 commit comments

Comments
 (0)