Skip to content

Commit d294203

Browse files
committed
chore: fix live-status-gateway lint
1 parent 6842058 commit d294203

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

packages/live-status-gateway/sample-client/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable no-undef */
2+
13
const ws = new WebSocket(`ws://localhost:8080`)
24
ws.addEventListener('message', (message) => {
35
const data = JSON.parse(message.data)

packages/live-status-gateway/src/connector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Connector {
6464

6565
this._logger.info('Shutting down in 10 seconds!')
6666
setTimeout(() => {
67-
// eslint-disable-next-line no-process-exit
67+
// eslint-disable-next-line n/no-process-exit
6868
process.exit(0)
6969
}, 10 * 1000)
7070
return

packages/live-status-gateway/src/coreHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export class CoreHandler {
251251
this.logger.error(e)
252252
})
253253
}
254-
// eslint-disable-next-line @typescript-eslint/ban-types
254+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
255255
const fcn: Function = fcnObject[cmd.functionName as keyof CoreHandler] as Function
256256
try {
257257
if (!fcn) throw Error(`Function "${cmd.functionName}" not found on device "${cmd.deviceId}"!`)
@@ -309,7 +309,7 @@ export class CoreHandler {
309309
if (actually === 1) {
310310
this.logger.info('KillProcess command received, shutting down in 1000ms!')
311311
setTimeout(() => {
312-
// eslint-disable-next-line no-process-exit
312+
// eslint-disable-next-line n/no-process-exit
313313
process.exit(0)
314314
}, 1000)
315315
return true

packages/live-status-gateway/src/topics/root.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export class RootChannel extends WebSocketTopicBase implements WebSocketTopic {
6666
}
6767

6868
processMessage(ws: WebSocket, msg: object): void {
69+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
6970
this._logger.info(`Process root message '${msg}'`)
7071
try {
7172
const msgObj = JSON.parse(msg as unknown as string) as RootMsg
@@ -86,7 +87,7 @@ export class RootChannel extends WebSocketTopicBase implements WebSocketTopic {
8687
this._logger.info(`Process root message received unexpected event`)
8788
}
8889
} else this._logger.error(`Process root message received malformed payload`)
89-
} catch (e) {
90+
} catch (_e) {
9091
this._logger.error(`Process root message expected an object as payload`)
9192
}
9293
}

0 commit comments

Comments
 (0)