From 041a3ce2b607fedefa3fad9c871e4c1de41eb9e4 Mon Sep 17 00:00:00 2001 From: Nikolaos Stefanou Date: Tue, 25 Feb 2020 17:00:41 +0000 Subject: [PATCH] fix lint errors --- .../src/components/serialSettingsTab.component.ts | 2 +- terminus-serial/src/components/serialTab.component.ts | 2 +- terminus-serial/src/services/serial.service.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/terminus-serial/src/components/serialSettingsTab.component.ts b/terminus-serial/src/components/serialSettingsTab.component.ts index 3165b3ee..35ec995d 100644 --- a/terminus-serial/src/components/serialSettingsTab.component.ts +++ b/terminus-serial/src/components/serialSettingsTab.component.ts @@ -31,7 +31,7 @@ export class SerialSettingsTabComponent { port: '', baudrate: 115200, databits: 8, - parity: "none", + parity: 'none', rtscts: false, stopbits: 1, xany: false, diff --git a/terminus-serial/src/components/serialTab.component.ts b/terminus-serial/src/components/serialTab.component.ts index 54c0d4bc..3ae70703 100644 --- a/terminus-serial/src/components/serialTab.component.ts +++ b/terminus-serial/src/components/serialTab.component.ts @@ -6,7 +6,7 @@ import { first } from 'rxjs/operators' import { BaseTerminalTabComponent } from 'terminus-terminal' import { SerialService } from '../services/serial.service' import { SerialConnection, SerialSession } from '../api' -import { Subscription } from 'rxjs'; +import { Subscription } from 'rxjs' /** @hidden */ @Component({ diff --git a/terminus-serial/src/services/serial.service.ts b/terminus-serial/src/services/serial.service.ts index 41e4ff77..3d8451b6 100644 --- a/terminus-serial/src/services/serial.service.ts +++ b/terminus-serial/src/services/serial.service.ts @@ -1,5 +1,5 @@ import { Injectable, NgZone } from '@angular/core' -const SerialPort = require('serialport') +import SerialPort from 'serialport' import { ToastrService } from 'ngx-toastr' import { AppService, LogService } from 'terminus-core' import { SerialConnection, SerialSession } from '../api' @@ -34,11 +34,11 @@ export class SerialService { return session } - async connectSession (session: SerialSession, logCallback?: (s: any) => void): Promise { + async connectSession (session: SerialSession, _?: (s: any) => void): Promise { const serial = new SerialPort(session.connection.port, { autoOpen: false, baudRate: session.connection.baudrate, - dataBits: session.connection.databits, stopBits: session.connection.stopbits, parity: session.connection.parity, - rtscts: session.connection.rtscts, xon: session.connection.xon, xoff: session.connection.xoff, - xany: session.connection.xany }) + dataBits: session.connection.databits, stopBits: session.connection.stopbits, parity: session.connection.parity, + rtscts: session.connection.rtscts, xon: session.connection.xon, xoff: session.connection.xoff, + xany: session.connection.xany }) session.serial = serial let connected = false await new Promise(async (resolve, reject) => {