From b6fd7a2b93ea87ed56c00868fe98b72395818840 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 23 Aug 2023 04:42:21 -0700 Subject: [PATCH] Ignore no-unused-vars in test files --- .eslintrc.json | 3 ++- .../xterm-addon-canvas/src/TextRenderLayer.ts | 18 ++++++++--------- src/browser/services/RenderService.ts | 15 +++++++------- src/common/Types.d.ts | 10 +++++----- src/common/buffer/Buffer.ts | 20 +++++++++---------- 5 files changed, 32 insertions(+), 34 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e1997f0c..93b2a4ce 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -237,7 +237,8 @@ "files": ["**/*.test.ts"], "rules": { "object-curly-spacing": "off", - "max-len": "off" + "max-len": "off", + "no-unused-vars": "off" } } ] diff --git a/addons/xterm-addon-canvas/src/TextRenderLayer.ts b/addons/xterm-addon-canvas/src/TextRenderLayer.ts index 0066cc7d..46d052f3 100644 --- a/addons/xterm-addon-canvas/src/TextRenderLayer.ts +++ b/addons/xterm-addon-canvas/src/TextRenderLayer.ts @@ -4,18 +4,16 @@ */ import { IRenderDimensions } from 'browser/renderer/shared/Types'; -import { CharData, ICellData } from 'common/Types'; -import { GridCache } from './GridCache'; -import { BaseRenderLayer } from './BaseRenderLayer'; -import { AttributeData } from 'common/buffer/AttributeData'; -import { NULL_CELL_CODE, Content, UnderlineStyle } from 'common/buffer/Constants'; -import { IColorSet, ReadonlyColorSet } from 'browser/Types'; -import { CellData } from 'common/buffer/CellData'; -import { IOptionsService, IBufferService, IDecorationService } from 'common/services/Services'; -import { ICharacterJoinerService, ICoreBrowserService, IThemeService } from 'browser/services/Services'; import { JoinedCellData } from 'browser/services/CharacterJoinerService'; -import { color, css } from 'common/Color'; +import { ICharacterJoinerService, ICoreBrowserService, IThemeService } from 'browser/services/Services'; +import { CharData, ICellData } from 'common/Types'; +import { AttributeData } from 'common/buffer/AttributeData'; +import { CellData } from 'common/buffer/CellData'; +import { Content, NULL_CELL_CODE } from 'common/buffer/Constants'; +import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; import { Terminal } from 'xterm'; +import { BaseRenderLayer } from './BaseRenderLayer'; +import { GridCache } from './GridCache'; /** * This CharData looks like a null character, which will forc a clear and render diff --git a/src/browser/services/RenderService.ts b/src/browser/services/RenderService.ts index c31d061a..41f0c9b5 100644 --- a/src/browser/services/RenderService.ts +++ b/src/browser/services/RenderService.ts @@ -3,17 +3,16 @@ * @license MIT */ -import { IRenderer, IRenderDimensions } from 'browser/renderer/shared/Types'; -import { RenderDebouncer } from 'browser/RenderDebouncer'; -import { EventEmitter, IEvent } from 'common/EventEmitter'; -import { Disposable } from 'common/Lifecycle'; -import { ScreenDprMonitor } from 'browser/ScreenDprMonitor'; import { addDisposableDomListener } from 'browser/Lifecycle'; -import { IColorSet, IRenderDebouncerWithCallback, ReadonlyColorSet } from 'browser/Types'; -import { IOptionsService, IBufferService, IDecorationService } from 'common/services/Services'; +import { RenderDebouncer } from 'browser/RenderDebouncer'; +import { ScreenDprMonitor } from 'browser/ScreenDprMonitor'; +import { IRenderDebouncerWithCallback } from 'browser/Types'; +import { IRenderDimensions, IRenderer } from 'browser/renderer/shared/Types'; import { ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services'; +import { EventEmitter } from 'common/EventEmitter'; +import { Disposable } from 'common/Lifecycle'; import { DebouncedIdleTask } from 'common/TaskQueue'; -import { ThemeService } from 'browser/services/ThemeService'; +import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; interface ISelectionState { start: [number, number] | undefined; diff --git a/src/common/Types.d.ts b/src/common/Types.d.ts index ca9e25ff..4a9d7022 100644 --- a/src/common/Types.d.ts +++ b/src/common/Types.d.ts @@ -3,13 +3,13 @@ * @license MIT */ -import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm'; -import { IEvent, IEventEmitter } from 'common/EventEmitter'; import { IDeleteEvent, IInsertEvent } from 'common/CircularList'; +import { IEvent, IEventEmitter } from 'common/EventEmitter'; +import { Attributes, UnderlineStyle } from 'common/buffer/Constants'; // eslint-disable-line no-unused-vars +import { IBufferSet } from 'common/buffer/Types'; import { IParams } from 'common/parser/Types'; import { ICoreMouseService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services'; -import { IBufferSet } from 'common/buffer/Types'; -import { Attributes, UnderlineStyle } from 'common/buffer/Constants'; +import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm'; export interface ICoreTerminal { coreMouseService: ICoreMouseService; @@ -544,7 +544,7 @@ export interface IInputHandler { /** ESC # 8 */ screenAlignmentPattern(): boolean; } -interface IParseStack { +export interface IParseStack { paused: boolean; cursorStartX: number; cursorStartY: number; diff --git a/src/common/buffer/Buffer.ts b/src/common/buffer/Buffer.ts index a82a4569..250c96bc 100644 --- a/src/common/buffer/Buffer.ts +++ b/src/common/buffer/Buffer.ts @@ -4,17 +4,17 @@ */ import { CircularList, IInsertEvent } from 'common/CircularList'; -import { IBuffer } from 'common/buffer/Types'; -import { IBufferLine, ICellData, IAttributeData, ICharset } from 'common/Types'; -import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine'; -import { CellData } from 'common/buffer/CellData'; -import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX } from 'common/buffer/Constants'; -import { reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths, getWrappedLineTrimmedLength } from 'common/buffer/BufferReflow'; -import { Marker } from 'common/buffer/Marker'; -import { IOptionsService, IBufferService } from 'common/services/Services'; -import { DEFAULT_CHARSET } from 'common/data/Charsets'; -import { ExtendedAttrs } from 'common/buffer/AttributeData'; import { IdleTaskQueue } from 'common/TaskQueue'; +import { IAttributeData, IBufferLine, ICellData, ICharset } from 'common/Types'; +import { ExtendedAttrs } from 'common/buffer/AttributeData'; +import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine'; +import { getWrappedLineTrimmedLength, reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths } from 'common/buffer/BufferReflow'; +import { CellData } from 'common/buffer/CellData'; +import { NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, WHITESPACE_CELL_WIDTH } from 'common/buffer/Constants'; +import { Marker } from 'common/buffer/Marker'; +import { IBuffer } from 'common/buffer/Types'; +import { DEFAULT_CHARSET } from 'common/data/Charsets'; +import { IBufferService, IOptionsService } from 'common/services/Services'; export const MAX_BUFFER_SIZE = 4294967295; // 2^32 - 1