mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Update tslint, fix lint
This commit is contained in:
Generated
+251
-759
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -66,7 +66,7 @@
|
||||
"node-pty": "^0.7.2",
|
||||
"nodemon": "1.10.2",
|
||||
"sorcery": "^0.10.0",
|
||||
"tslint": "^4.0.2",
|
||||
"tslint": "^5.9.1",
|
||||
"typescript": "~2.4.0",
|
||||
"vinyl-buffer": "^1.0.0",
|
||||
"vinyl-source-stream": "^1.1.0",
|
||||
|
||||
@@ -217,7 +217,7 @@ export class CompositionHelper {
|
||||
if (!dontRecurse) {
|
||||
setTimeout(() => this.updateCompositionElements(true), 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the textarea's position so that the cursor does not blink on IE.
|
||||
@@ -226,5 +226,5 @@ export class CompositionHelper {
|
||||
private clearTextareaPosition(): void {
|
||||
this.textarea.style.left = '';
|
||||
this.textarea.style.top = '';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,4 +76,4 @@ export namespace C0 {
|
||||
export const SP = '\x20';
|
||||
/** Delete (Caret = ^?) */
|
||||
export const DEL = '\x7f';
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ export interface IEventEmitter {
|
||||
export interface IListenerType {
|
||||
(data?: any): void;
|
||||
listener?: (data?: any) => void;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ILinkMatcherOptions {
|
||||
/**
|
||||
|
||||
+2
-2
@@ -443,7 +443,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
this.element.classList.add('focus');
|
||||
this.showCursor();
|
||||
this.emit('focus');
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Blur the terminal, calling the blur function on the terminal's underlying
|
||||
@@ -2220,7 +2220,7 @@ function matchColorDistance(r1: number, g1: number, b1: number, r2: number, g2:
|
||||
return Math.pow(30 * (r1 - r2), 2)
|
||||
+ Math.pow(59 * (g1 - g2), 2)
|
||||
+ Math.pow(11 * (b1 - b2), 2);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function matchColor_(r1: number, g1: number, b1: number): number {
|
||||
|
||||
+1
-1
@@ -32,4 +32,4 @@ export enum LinkHoverEventTypes {
|
||||
HOVER = 'linkhover',
|
||||
TOOLTIP = 'linktooltip',
|
||||
LEAVE = 'linkleave'
|
||||
};
|
||||
}
|
||||
|
||||
+3
-3
@@ -119,7 +119,7 @@ export class Viewport implements IViewport {
|
||||
this.viewportElement.scrollTop += ev.deltaY * multiplier;
|
||||
// Prevent the page from scrolling when the terminal scrolls
|
||||
ev.preventDefault();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the touchstart event, recording the touch occurred.
|
||||
@@ -127,7 +127,7 @@ export class Viewport implements IViewport {
|
||||
*/
|
||||
public onTouchStart(ev: TouchEvent): void {
|
||||
this.lastTouchY = ev.touches[0].pageY;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the touchmove event, scrolling the viewport if the position shifted.
|
||||
@@ -141,5 +141,5 @@ export class Viewport implements IViewport {
|
||||
}
|
||||
this.viewportElement.scrollTop += deltaY;
|
||||
ev.preventDefault();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export function attach(term: any, socket: WebSocket, bidirectional: boolean, buf
|
||||
|
||||
socket.addEventListener('close', term.detach.bind(term, socket));
|
||||
socket.addEventListener('error', term.detach.bind(term, socket));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches the given terminal from the given socket
|
||||
@@ -91,7 +91,7 @@ export function detach(term: any, socket: WebSocket): void {
|
||||
}
|
||||
|
||||
delete term.socket;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export function apply(terminalConstructor: any): void {
|
||||
@@ -118,4 +118,4 @@ export function apply(terminalConstructor: any): void {
|
||||
terminalConstructor.prototype.detach = (socket: WebSocket) => {
|
||||
return detach(this, socket);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export function fit(term: any): void {
|
||||
term.resize(geometry.cols, geometry.rows);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function apply(terminalConstructor: any): void {
|
||||
terminalConstructor.prototype.proposeGeometry = function (): IGeometry {
|
||||
|
||||
@@ -20,7 +20,7 @@ export function toggleFullScreen(term: any, fullscreen: boolean): void {
|
||||
}
|
||||
|
||||
term.element.classList[fn]('fullscreen');
|
||||
};
|
||||
}
|
||||
|
||||
export function apply(terminalConstructor: any): void {
|
||||
terminalConstructor.prototype.toggleFullScreen = function (fullscreen: boolean): void {
|
||||
|
||||
@@ -17,7 +17,7 @@ export function findNext(terminal: any, term: string): boolean {
|
||||
terminal.searchHelper = new SearchHelper(terminal);
|
||||
}
|
||||
return (<SearchHelper>terminal.searchHelper).findNext(term);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the previous instance of the term, then scroll to and select it. If it
|
||||
@@ -30,7 +30,7 @@ export function findPrevious(terminal: any, term: string): boolean {
|
||||
terminal.searchHelper = new SearchHelper(terminal);
|
||||
}
|
||||
return (<SearchHelper>terminal.searchHelper).findPrevious(term);
|
||||
};
|
||||
}
|
||||
|
||||
export function apply(terminalConstructor: any): void {
|
||||
terminalConstructor.prototype.findNext = function(term: any): boolean {
|
||||
|
||||
@@ -63,7 +63,7 @@ export function terminadoAttach(term: any, socket: WebSocket, bidirectional: boo
|
||||
|
||||
socket.addEventListener('close', term.terminadoDetach.bind(term, socket));
|
||||
socket.addEventListener('error', term.terminadoDetach.bind(term, socket));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches the given terminal from the given socket
|
||||
@@ -82,7 +82,7 @@ export function terminadoDetach(term: any, socket: WebSocket): void {
|
||||
}
|
||||
|
||||
delete term.socket;
|
||||
};
|
||||
}
|
||||
|
||||
export function apply(terminalConstructor: any): void {
|
||||
/**
|
||||
|
||||
@@ -178,7 +178,7 @@ export class MouseZoneManager implements IMouseZoneManager {
|
||||
if (zone.y === coords[1] && zone.x1 <= coords[0] && zone.x2 > coords[0]) {
|
||||
return zone;
|
||||
}
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,9 +192,9 @@ export class TextRenderLayer extends BaseRenderLayer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a character is overlapping to the next cell.
|
||||
*/
|
||||
/**
|
||||
* Whether a character is overlapping to the next cell.
|
||||
*/
|
||||
private _isOverlapping(charData: CharData): boolean {
|
||||
// Only single cell characters can be overlapping, rendering issues can
|
||||
// occur without this check
|
||||
|
||||
@@ -13,4 +13,4 @@ export enum FLAGS {
|
||||
INVERSE = 8,
|
||||
INVISIBLE = 16,
|
||||
DIM = 32
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
*/
|
||||
export function contains(arr: any[], el: any): boolean {
|
||||
return arr.indexOf(el) >= 0;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user