chore: Enforce a few house rules via eslint (#2539)
This commit is contained in:
committed by
dermotduffy
parent
5572ec728e
commit
921d45e577
@@ -93,7 +93,7 @@ export class AdvancedCameraCardViewerCarousel extends LitElement {
|
||||
(this._selected !== null && this._media?.[this._selected]?.getID()) || null,
|
||||
callback: () => {
|
||||
this._mediaHeightController.recalculate();
|
||||
this._seekHandler();
|
||||
void this._seekHandler();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -388,7 +388,7 @@ export class AdvancedCameraCardViewerCarousel extends LitElement {
|
||||
?.context?.mediaViewer?.seek?.getTime() !==
|
||||
this.viewManagerEpoch?.oldView?.context?.mediaViewer?.seek?.getTime()
|
||||
) {
|
||||
this._seekHandler();
|
||||
void this._seekHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ export class AdvancedCameraCardViewerCarousel extends LitElement {
|
||||
if (!this._media?.length || this._selected === null) {
|
||||
this._mediaActionsController.unsetTarget();
|
||||
} else {
|
||||
this._mediaActionsController.setTarget(
|
||||
void this._mediaActionsController.setTarget(
|
||||
this._selected,
|
||||
// Camera in this carousel is only selected if the camera from the view
|
||||
// matches the filtered camera.
|
||||
@@ -438,16 +438,16 @@ export class AdvancedCameraCardViewerCarousel extends LitElement {
|
||||
const seekTimeInMedia = selectedMedia.includesTime(seek);
|
||||
this.toggleAttribute('unseekable', !seekTimeInMedia);
|
||||
if (!seekTimeInMedia && !mediaPlayerController.isPaused()) {
|
||||
mediaPlayerController.pause();
|
||||
void mediaPlayerController.pause();
|
||||
} else if (seekTimeInMedia && mediaPlayerController.isPaused()) {
|
||||
mediaPlayerController.play();
|
||||
void mediaPlayerController.play();
|
||||
}
|
||||
|
||||
const seekTime =
|
||||
(await this.cameraManager?.getMediaSeekTime(selectedMedia, seek)) ?? null;
|
||||
|
||||
if (seekTime !== null) {
|
||||
mediaPlayerController.seek(seekTime);
|
||||
void mediaPlayerController.seek(seekTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ export class AdvancedCameraCardViewerGrid extends LitElement {
|
||||
|
||||
protected willUpdate(changedProps: PropertyValues): void {
|
||||
if (changedProps.has('viewManagerEpoch') && this._needsGrid()) {
|
||||
import('../media-grid.js');
|
||||
void import('../media-grid.js');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,11 +157,11 @@ export class AdvancedCameraCardViewerProvider extends LitElement implements Medi
|
||||
changedProps.has('resolvedMediaCache') ||
|
||||
changedProps.has('hass')
|
||||
) {
|
||||
this._resolveURL();
|
||||
void this._resolveURL();
|
||||
}
|
||||
|
||||
if (changedProps.has('viewerConfig') && this.viewerConfig?.zoomable) {
|
||||
import('../zoomer.js');
|
||||
void import('../zoomer.js');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class AdvancedCameraCardViewerProvider extends LitElement implements Medi
|
||||
.targetID=${mediaID}
|
||||
@click=${() => {
|
||||
if (this.viewerConfig?.snapshot_click_plays_clip) {
|
||||
this._switchToRelatedClipView();
|
||||
void this._switchToRelatedClipView();
|
||||
}
|
||||
}}
|
||||
></advanced-camera-card-image-player>`}
|
||||
|
||||
Reference in New Issue
Block a user