Skip to content

Commit

Permalink
upgrade dev dependencies to the latest and fix lint errors (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
connectdotz authored Nov 2, 2023
1 parent 15b61f5 commit 41af576
Show file tree
Hide file tree
Showing 14 changed files with 503 additions and 114 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,26 +670,26 @@
"@types/istanbul-lib-coverage": "^2.0.4",
"@types/istanbul-lib-source-maps": "^4.0.1",
"@types/jest": "^29.5.6",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"@types/node": "^20.8.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vscode/test-electron": "^2.2.2",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.1",
"fs-extra": "^11.1.1",
"jest": "^29.7",
"jest-snapshot": "^27.2.0",
"prettier": "^2.8.2",
"prettier": "^3.0.3",
"raw-loader": "^4.0.1",
"rimraf": "^3.0.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.0.3",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"typescript": "^5.2.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
Expand Down
5 changes: 4 additions & 1 deletion src/JestExt/output-terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export class ExtOutputTerminal implements JestExtOutput {
this._terminal = undefined;
},
};
constructor(private name: string, enabled?: boolean) {
constructor(
private name: string,
enabled?: boolean
) {
this.ptyIsOpen = false;
this.pendingMessages = new PendingOutput();
this.enabled = enabled ?? false;
Expand Down
6 changes: 5 additions & 1 deletion src/JestExt/process-listeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ export const DEFAULT_LONG_RUN_THRESHOLD = 60000;
export class LongRunMonitor {
private timer: NodeJS.Timeout | undefined;
public readonly thresholdMs: number;
constructor(private callback: () => void, private logging: Logging, option?: MonitorLongRun) {
constructor(
private callback: () => void,
private logging: Logging,
option?: MonitorLongRun
) {
if (option == null) {
this.thresholdMs = DEFAULT_LONG_RUN_THRESHOLD;
} else if (typeof option === 'number' && option > 0) {
Expand Down
4 changes: 1 addition & 3 deletions src/JestProcessManagement/JestProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export class JestProcess implements JestProcessInfo {
}

private getReporterPath() {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const extensionPath = vscode.extensions.getExtension(extensionId)!.extensionPath;
return join(extensionPath, 'out', 'reporter.js');
}
Expand All @@ -112,7 +111,6 @@ export class JestProcess implements JestProcessInfo {
args: { args: ['--colors'] },
};

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const args = options.args!.args;

switch (this.request.type) {
Expand Down Expand Up @@ -186,7 +184,7 @@ export class JestProcess implements JestProcessInfo {
const promise = new Promise<void>((resolve, reject) => {
taskInfo = { runner, resolve, reject };
});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

this.task = { ...taskInfo!, promise };

runner.start(this.watchMode !== WatchMode.None, this.watchMode === WatchMode.WatchAll);
Expand Down
1 change: 0 additions & 1 deletion src/JestProcessManagement/JestProcessManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class JestProcessManager implements TaskArrayFunctions<JestProcess> {
}

private getQueue(type: QueueType): TaskQueue<JestProcess> {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.queues.get(type)!;
}

Expand Down
5 changes: 4 additions & 1 deletion src/StatusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export interface StatusBarUpdateRequest {
class TypedStatusBarItem {
public status: ExtensionStatus = {};
public isVisible = false;
constructor(public readonly type: StatusType, protected readonly actual: vscode.StatusBarItem) {
constructor(
public readonly type: StatusType,
protected readonly actual: vscode.StatusBarItem
) {
this.actual.hide();
}
hide() {
Expand Down
6 changes: 5 additions & 1 deletion src/TestResults/TestResultProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export class TestSuiteRecord implements TestSuiteUpdatable {
private _testBlocks?: TestBlocks | 'failed';
private _assertionContainer?: ContainerNode<TestAssertionStatus>;

constructor(public testFile: string, private reconciler: TestReconciler, private parser: Parser) {
constructor(
public testFile: string,
private reconciler: TestReconciler,
private parser: Parser
) {
this._status = TestReconciliationState.Unknown;
this._message = '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/TestResults/match-by-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const createMessaging =
type MatchResultType<C extends ContextType> = [
ChildNodeType<ItBlock, C>,
ChildNodeType<TestAssertionStatus, C>[],
MatchEvent
MatchEvent,
];
interface ContextMatchAlgorithm {
match: (
Expand Down
2 changes: 1 addition & 1 deletion src/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function _extractActionTitles(actions?: MessageAction[]): string[] {
return actions ? actions.map((a) => a.title) : [];
}
// expose the internal function so we can unit testing it
// eslint-disable-next-line @typescript-eslint/no-empty-function

const doNothing = () => {};
export function _handleMessageActions(actions?: MessageAction[]): (action?: string) => void {
if (!actions || actions.length <= 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/noop-fs-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* istanbul ignore file */
/* eslint-disable @typescript-eslint/no-empty-function */

import * as vscode from 'vscode';

/**
Expand Down
12 changes: 8 additions & 4 deletions src/test-provider/test-item-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ abstract class TestItemDataBase implements TestItemData, JestRunnable, WithUri {
item!: vscode.TestItem;
log: Logging;

constructor(public context: JestTestProviderContext, name: string) {
constructor(
public context: JestTestProviderContext,
name: string
) {
this.log = context.ext.loggingFactory.create(name);
}
get uri(): vscode.Uri {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.item.uri!;
}

Expand Down Expand Up @@ -466,7 +468,6 @@ export class WorkspaceRoot extends TestItemDataBase {

export class FolderData extends TestItemDataBase {
static makeUri = (parent: vscode.TestItem, folderName: string): vscode.Uri => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return vscode.Uri.joinPath(parent.uri!, folderName);
};
constructor(
Expand Down Expand Up @@ -522,7 +523,10 @@ const isEmpty = (node?: ItemNodeType): boolean => {

// type AssertNode = NodeType<TestAssertionStatus>;
abstract class TestResultData extends TestItemDataBase {
constructor(readonly context: JestTestProviderContext, name: string) {
constructor(
readonly context: JestTestProviderContext,
name: string
) {
super(context, name);
}

Expand Down
1 change: 0 additions & 1 deletion tests/TestResults/TestResultProvider.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
jest.unmock('../../src/TestResults/TestResultProvider');
jest.unmock('../../src/TestResults/test-result-events');
jest.unmock('../../src/TestResults/match-node');
Expand Down
2 changes: 1 addition & 1 deletion tests/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const makeAssertion = (
status,
location: location ? makeLocation(location) : EmptyLocation,
...(override || {}),
} as TestAssertionStatus);
}) as TestAssertionStatus;

export const makeTestResult = (
title: string,
Expand Down
Loading

0 comments on commit 41af576

Please sign in to comment.