From 17065f4cee72dbbdb3fe89bf568f696a689ddab6 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 5 Sep 2019 12:08:43 +0200 Subject: [PATCH] lint --- .eslintrc.yml | 5 +++++ terminus-terminal/src/frontends/xtermFrontend.ts | 8 ++++---- terminus-terminal/src/index.ts | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 93da6cf8..890fd46d 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -86,3 +86,8 @@ rules: - as-needed - keywords: true numbers: true + quotes: off + '@typescript-eslint/quotes': + - error + - single + - allowTemplateLiterals: true diff --git a/terminus-terminal/src/frontends/xtermFrontend.ts b/terminus-terminal/src/frontends/xtermFrontend.ts index c8425ac3..0d3b8acd 100644 --- a/terminus-terminal/src/frontends/xtermFrontend.ts +++ b/terminus-terminal/src/frontends/xtermFrontend.ts @@ -87,11 +87,11 @@ export class XTermFrontend extends Frontend { try { if (this.xtermCore.element && getComputedStyle(this.xtermCore.element).getPropertyValue('height') !== 'auto') { let t = window.getComputedStyle(this.xtermCore.element.parentElement) - let r = parseInt(t.getPropertyValue("height")) - let n = Math.max(0, parseInt(t.getPropertyValue("width"))) + let r = parseInt(t.getPropertyValue('height')) + let n = Math.max(0, parseInt(t.getPropertyValue('width'))) let o = window.getComputedStyle(this.xtermCore.element) - let i = r - (parseInt(o.getPropertyValue("padding-top")) + parseInt(o.getPropertyValue("padding-bottom"))) - let l = n - (parseInt(o.getPropertyValue("padding-right")) + parseInt(o.getPropertyValue("padding-left"))) - this.xtermCore.viewport.scrollBarWidth + let i = r - (parseInt(o.getPropertyValue('padding-top')) + parseInt(o.getPropertyValue('padding-bottom'))) + let l = n - (parseInt(o.getPropertyValue('padding-right')) + parseInt(o.getPropertyValue('padding-left'))) - this.xtermCore.viewport.scrollBarWidth let actualCellWidth = this.xtermCore._renderService.dimensions.actualCellWidth || 9 let actualCellHeight = this.xtermCore._renderService.dimensions.actualCellHeight || 17 let cols = Math.floor(l / actualCellWidth) diff --git a/terminus-terminal/src/index.ts b/terminus-terminal/src/index.ts index ce377213..c7c3d51e 100644 --- a/terminus-terminal/src/index.ts +++ b/terminus-terminal/src/index.ts @@ -162,7 +162,7 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/ argv = argv.slice(1) } - if(require('yargs').parse(argv.slice(1))._[0] !== "open"){ + if(require('yargs').parse(argv.slice(1))._[0] !== 'open'){ app.ready$.subscribe(() => { terminal.openTab() }) -- GitLab