Skip to content

Commit e35a07d

Browse files
committed
Fix all Typescript lint errors
Also enable lint in GitHub Actions
1 parent e710923 commit e35a07d

4 files changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/node-lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ jobs:
2626
cache-dependency-path: web/package-lock.json
2727

2828
- run: npm ci
29+
- run: npm run lint
2930
# - run: npm test #TODO add tests

web/src/components/admin/menus/ApiPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface ApiSettingsResult {
1010

1111
const ApiPage = () => {
1212
const { locale } = useContext(LocaleContext)
13-
const [response, setResponse] = useState<ApiSettingsResult[]>()
13+
const [response] = useState<ApiSettingsResult[]>()
1414

1515
// const refreshStatus = () => {
1616
// fetch(`/api/admin/status`, {

web/src/components/player/Player.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ const Player = (props: PlayerProps) => {
3939
const [streamState, setStreamState] = useState<"Loading" | "Playing" | "Offline" | "Error">("Loading");
4040
const [videoOverlayVisible, setVideoOverlayVisible] = useState<boolean>(false)
4141

42-
const [resetCounter, setResetCounter] = useState(0)
43-
4442
const clickDelay = 250;
4543
const videoRef = useRef<HTMLVideoElement>(null);
4644
const layerEndpointRef = useRef<string>('');
@@ -142,8 +140,6 @@ const Player = (props: PlayerProps) => {
142140
player?.addEventListener('mouseleave', () => handleOverlayTimer(false))
143141

144142
peerConnectionConfig.onStreamRestart = () => {
145-
setResetCounter((prev) => prev + 1)
146-
147143
PeerConnectionSetup(peerConnectionConfig)
148144
.then((peerConnection) => {
149145
window.addEventListener("beforeunload", () => peerConnection.close())

web/src/utilities/base64.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function toBase64Utf8(input: string | undefined): string {
1+
export default function toBase64Utf8(input: string | null | undefined): string {
22
const utf8Bytes = new TextEncoder().encode(input ?? "")
33
const binary = Array.from(utf8Bytes).map(b => String.fromCharCode(b)).join('')
44

0 commit comments

Comments
 (0)