Skip to content

Commit d486ca7

Browse files
committed
fix: fix lint errors in harness test and polyfills
1 parent 140bd94 commit d486ca7

2 files changed

Lines changed: 10 additions & 19 deletions

File tree

example/__tests__/dispose-prop-diffing.harness.tsx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
import {
2-
describe,
3-
it,
4-
expect,
5-
render,
6-
cleanup,
7-
} from 'react-native-harness';
1+
import { describe, it, expect, render, cleanup } from 'react-native-harness';
82
import { useState, useEffect } from 'react';
93
import { View, Text } from 'react-native';
10-
import {
11-
RiveView,
12-
useRiveFile,
13-
Fit,
14-
} from '@rive-app/react-native';
4+
import { RiveView, useRiveFile, Fit } from '@rive-app/react-native';
155

166
const BOUNCING_BALL = require('../assets/rive/bouncing_ball.riv');
177
const COUNTER = require('../assets/rive/counter.riv');
@@ -25,17 +15,18 @@ function RiveBox({ source }: { source: number }) {
2515
return (
2616
<View style={{ width: 100, height: 100 }}>
2717
{riveFile && (
28-
<RiveView file={riveFile} autoPlay fit={Fit.Contain} style={{ flex: 1 }} />
18+
<RiveView
19+
file={riveFile}
20+
autoPlay
21+
fit={Fit.Contain}
22+
style={{ flex: 1 }}
23+
/>
2924
)}
3025
</View>
3126
);
3227
}
3328

34-
function FileSwitcher({
35-
fileIdx,
36-
}: {
37-
fileIdx: number;
38-
}) {
29+
function FileSwitcher({ fileIdx }: { fileIdx: number }) {
3930
const source = FILES[fileIdx % FILES.length]!;
4031
return <RiveBox source={source} />;
4132
}

example/src/polyfills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global globalThis */
1+
/* global globalThis, performance */
22
// Polyfill performance.measure and console.timeStamp BEFORE React loads
33
// to enable supportsUserTiming in ReactFabric-dev.js (same as Expo environment).
44
// Without this, the dispose-during-prop-diffing crash only reproduces on Expo.

0 commit comments

Comments
 (0)