Skip to content

Commit 15a1ade

Browse files
Copilotzhiqingchen
andcommitted
Fix ESLint formatting issues
Co-authored-by: zhiqingchen <1876158+zhiqingchen@users.noreply.github.com>
1 parent 53311c1 commit 15a1ade

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/__tests__/chart.test.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ import { dispatchEventsToZRender } from '../components/events';
1818
import { SVGRenderer } from '../svg/SVGRenderer';
1919
import * as echarts from 'echarts/core';
2020
import type { EChartsType } from 'echarts/core';
21-
import type { RNGestureHandlerGesture, ChartElement, DefaultRNGestures, DispatchEvents } from '../types';
21+
import type {
22+
RNGestureHandlerGesture,
23+
ChartElement,
24+
DefaultRNGestures,
25+
DispatchEvents,
26+
} from '../types';
2227
import { BarChart, LineChart, GraphChart, ScatterChart } from 'echarts/charts';
2328
import {
2429
PanGesture,
@@ -110,7 +115,7 @@ function getOptionTwo() {
110115
animation: false,
111116
tooltip: {},
112117
animationDurationUpdate: 1500,
113-
animationEasingUpdate: 'quinticInOut' as any, // Temporarily cast to any for test
118+
animationEasingUpdate: 'quinticInOut' as any, // Temporarily cast to any for test
114119
series: [
115120
{
116121
type: 'graph',
@@ -257,7 +262,7 @@ function Chart({
257262
gesture,
258263
handleGesture = true,
259264
}: {
260-
Component: React.ComponentType<any>; // Keep as any to allow both SkiaChartProps and SVGChartProps with ref
265+
Component: React.ComponentType<any>; // Keep as any to allow both SkiaChartProps and SVGChartProps with ref
261266
calls?: ChartCall[];
262267
useRNGH?: boolean;
263268
gesture?: RNGestureHandlerGesture;
@@ -499,7 +504,10 @@ Components.forEach((Component) => {
499504
<RNGHChart
500505
Component={Component}
501506
useRNGH
502-
gesture={(defaultGestures: DefaultRNGestures, dispatchEvents: DispatchEvents) => {
507+
gesture={(
508+
defaultGestures: DefaultRNGestures,
509+
dispatchEvents: DispatchEvents
510+
) => {
503511
gesture(defaultGestures, dispatchEvents);
504512
return defaultGestures[0];
505513
}}

src/skia/graphic.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ function isImageLike(val: unknown): val is HTMLImageElement {
4747
return val != null && typeof val === 'object' && isString((val as any).src);
4848
}
4949
function isCanvasLike(val: unknown): val is HTMLCanvasElement {
50-
return val != null && typeof val === 'object' && isFunction((val as any).toDataURL);
50+
return (
51+
val != null && typeof val === 'object' && isFunction((val as any).toDataURL)
52+
);
5153
}
5254

5355
type SVGVNodeAttrs = Record<

0 commit comments

Comments
 (0)