Merge pull request #2829 from Tyriar/lgtm

Fix most lgtm warnings
This commit is contained in:
Daniel Imms
2020-04-10 14:22:24 -07:00
committed by GitHub
6 changed files with 10 additions and 20 deletions
@@ -3,7 +3,7 @@
* @license MIT
*/
import { ILinkProvider, IBufferCellPosition, ILink, Terminal, IBuffer } from 'xterm';
import { ILinkProvider, IBufferCellPosition, ILink, Terminal } from 'xterm';
export class WebLinkProvider implements ILinkProvider {
@@ -3,7 +3,7 @@
* @license MIT
*/
import { Terminal, ILinkMatcherOptions, ITerminalAddon, ILinkProvider, IDisposable } from 'xterm';
import { Terminal, ILinkMatcherOptions, ITerminalAddon, IDisposable } from 'xterm';
import { WebLinkProvider } from './WebLinkProvider';
const protocolClause = '(https?:\\/\\/)';
@@ -341,10 +341,6 @@ describe('WebGL Renderer Integration Tests', async () => {
await writeSync(page, data);
for (let y = 0; y < 240 / 16; y++) {
for (let x = 0; x < 16; x++) {
const cssColor = COLORS_16_TO_255[y * 16 + x];
const r = parseInt(cssColor.substr(1, 2), 16);
const g = parseInt(cssColor.substr(3, 2), 16);
const b = parseInt(cssColor.substr(5, 2), 16);
await pollFor(page, () => getCellColor(x + 1, y + 1), [0, 0, 0, 255]);
}
}
@@ -670,7 +666,6 @@ describe('WebGL Renderer Integration Tests', async () => {
await writeSync(page, data);
for (let y = 0; y < 16; y++) {
for (let x = 0; x < 16; x++) {
const i = y * 16 + x;
await pollFor(page, () => getCellColor(x + 1, y + 1), [0, 0, 0, 255]);
}
}
+7 -7
View File
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*
*
* Script to extract vt features documented in docstrings.
*/
const fs = require('fs');
@@ -265,7 +265,7 @@ To denote the sequences the tables use the same abbreviations as xterm does:
function hideDetailSections() {
for (let section of document.getElementsByClassName('sequence-details')) section.style.display = 'none';
}
function decorateDetailLinks() {
for (let link of document.getElementsByClassName('link-details')) {
link.addEventListener("click", toggleDetails, false);
@@ -344,11 +344,11 @@ function applyMacros(s) {
return s;
}
function replaceStatus(s) {
if (s === 'supported') return '<span title="supported">✓</span>';
if (s === 'unsupported') return '<span title="unsupported">✗</span>';
return s;
}
// function replaceStatus(s) {
// if (s === 'supported') return '<span title="supported">✓</span>';
// if (s === 'unsupported') return '<span title="unsupported">✗</span>';
// return s;
// }
function createAnchorSlug(s) {
return s.toLowerCase().split(' ').join('-');
-5
View File
@@ -105,11 +105,6 @@ function moveToRequestedCol(startX: number, startY: number, targetX: number, tar
).length, sequence(direction, applicationCursor));
}
function moveHorizontallyOnly(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {
const direction = horizontalDirection(startX, startY, targetX, targetY, bufferService, applicationCursor);
return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor));
}
/**
* Utility functions
*/
+1 -1
View File
@@ -5,7 +5,7 @@
import { ICoreService, ILogService, IOptionsService, IBufferService } from 'common/services/Services';
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { IDecPrivateModes, ICharset } from 'common/Types';
import { IDecPrivateModes } from 'common/Types';
import { clone } from 'common/Clone';
const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({