Skip to content

Commit 0b697bd

Browse files
author
Shane Osbourne
committed
lint
1 parent 1570865 commit 0b697bd

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

packages/messaging/lib/test-utils.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ export function mockWindows(params) {
4949

5050
// add the Id if it was a RequestMessage
5151
if ('Id' in input) {
52-
msg.id = input.Id
52+
msg = {
53+
...msg,
54+
id: input.Id,
55+
}
5356
}
5457

5558
// record the call

packages/special-pages/pages/duckplayer/src/js/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const VideoPlayer = {
4646
* @returns {HTMLIFrameElement}
4747
*/
4848
iframe: () => {
49+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLIFrameElement'.
4950
return document.querySelector('#player')
5051
},
5152

@@ -54,6 +55,7 @@ const VideoPlayer = {
5455
* @returns {HTMLElement}
5556
*/
5657
playerContainer: () => {
58+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
5759
return document.querySelector('.player-container')
5860
},
5961

@@ -107,6 +109,7 @@ const VideoPlayer = {
107109
showVideoError: (errorMessage) => {
108110
VideoPlayer.playerContainer().innerHTML = '<div class="player-error"><b>ERROR:</b> <span class="player-error-message"></span></div>'
109111

112+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
110113
document.querySelector('.player-error-message').textContent = errorMessage
111114
},
112115

@@ -403,13 +406,15 @@ const Setting = {
403406
* @returns {HTMLInputElement}
404407
*/
405408
settingsIcon: () => {
409+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
406410
return document.querySelector('[aria-label="Open Settings"]')
407411
},
408412
/**
409413
* Returns the checkbox
410414
* @returns {HTMLInputElement}
411415
*/
412416
checkbox: () => {
417+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
413418
return document.querySelector('#setting')
414419
},
415420

@@ -418,6 +423,7 @@ const Setting = {
418423
* @returns {HTMLElement}
419424
*/
420425
container: () => {
426+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
421427
return document.querySelector('.setting-container')
422428
},
423429

@@ -496,6 +502,7 @@ const Setting = {
496502
* settings container is animating/sliding in behind it.
497503
*/
498504
higlightSettingsButton: () => {
505+
// @ts-expect-error - Object is possibly 'null'.
499506
const openSettingsClasses = document.querySelector('.open-settings').classList
500507

501508
openSettingsClasses.add('active')
@@ -530,6 +537,7 @@ const PlayOnYouTube = {
530537
* @returns {HTMLElement}
531538
*/
532539
button: () => {
540+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
533541
return document.querySelector('.play-on-youtube')
534542
},
535543

@@ -573,6 +581,7 @@ const Tooltip = {
573581
* @returns {HTMLElement}
574582
*/
575583
icon: () => {
584+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
576585
return document.querySelector('.info-icon')
577586
},
578587

@@ -581,6 +590,7 @@ const Tooltip = {
581590
* @returns {HTMLElement}
582591
*/
583592
tooltip: () => {
593+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
584594
return document.querySelector('.info-icon-tooltip')
585595
},
586596

@@ -684,6 +694,7 @@ const MouseMove = {
684694
MouseMove.fadeInContent()
685695
}
686696

697+
// @ts-expect-error - Type 'Timeout' is not assignable to type 'null'.
687698
MouseMove.timer = setTimeout(() => {
688699
// Only fade out if user is not hovering content or tooltip is shown
689700
if (!MouseMove.isHoveringContent && !Tooltip.visible) {
@@ -697,6 +708,7 @@ const MouseMove = {
697708
* @returns {HTMLElement}
698709
*/
699710
bg: () => {
711+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
700712
return document.querySelector('.bg')
701713
},
702714

@@ -706,6 +718,7 @@ const MouseMove = {
706718
* @returns {HTMLElement}
707719
*/
708720
contentHover: () => {
721+
// @ts-expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
709722
return document.querySelector('.content-hover')
710723
},
711724

src/globals.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare namespace contentScopeFeatures {
1313
* Allows checks like `import.meta.env === "development"'
1414
*/
1515
interface ImportMeta {
16-
env?: 'production' | 'development'
16+
env: 'production' | 'development'
1717
platform?: 'windows' | 'integration'
1818
}
1919

0 commit comments

Comments
 (0)