Skip to content

Commit 7c9e435

Browse files
committed
style(image-cropper-web): lint
1 parent 067fecc commit 7c9e435

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/pluggableWidgets/image-cropper-web/src/stores/ImageCropperStore.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ export class ImageCropperStore implements SetupComponent {
186186
this.originalFile = undefined;
187187
this.canRestore = false;
188188
this.onImageChanged();
189-
void this.captureOriginal(uri, name, generation);
189+
// Fire-and-forget: captureOriginal never rejects (it handles its own errors below), so
190+
// there's no floating-promise to await. Bare call keeps eslint's no-void rule happy.
191+
this.captureOriginal(uri, name, generation);
190192
}
191193

192194
// Async original-bytes capture for Reset. Guarded by the generation token so a fetch

packages/pluggableWidgets/image-cropper-web/src/stores/__tests__/ImageCropperStore.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { action, makeObservable, observable } from "mobx";
44
import type { Crop, PixelCrop } from "react-image-crop";
55
import { DerivedPropsGate } from "@mendix/widget-plugin-mobx-kit/main";
66
import type { ImageCropperContainerProps } from "../../../typings/ImageCropperProps";
7-
import { CropperDeps, ImageCropperStore } from "../ImageCropperStore";
87

98
// The store calls cropImage/rotateImage (async canvas work). Mock them so the spec asserts
109
// orchestration (when/what is committed) without a real canvas.
@@ -24,6 +23,7 @@ jest.mock("../../utils/rotateImage", () => ({
2423

2524
import { cropImage } from "../../utils/cropImage";
2625
import { rotateImage } from "../../utils/rotateImage";
26+
import { CropperDeps, ImageCropperStore } from "../ImageCropperStore";
2727

2828
const PIXEL_CROP: PixelCrop = { unit: "px", x: 10, y: 10, width: 100, height: 100 };
2929
const PERCENT_CROP: Crop = { unit: "%", x: 20, y: 20, width: 40, height: 40 };

0 commit comments

Comments
 (0)