Skip to content

Commit e0f0855

Browse files
committed
style: fix require-await rule violations
1 parent cc8606b commit e0f0855

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

eslint.config.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export default tseslint.config(
7575
'@typescript-eslint/no-floating-promises': 'off', // 48 instances
7676
'no-async-promise-executor': 'off', // 25 instances
7777
'@typescript-eslint/prefer-promise-reject-errors': 'off', // 19 instances
78-
'@typescript-eslint/require-await': 'off', // 7 instances
7978
}
8079
},
8180
{

src/backend/disasm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ export class GdbDisassembler {
499499
const endAddress = range.qEnd;
500500
const validationAddr = range.verify;
501501
// To annotate questionable instructions. Too lazy to do on per instruction basis
502-
return new Promise<DisassemblyReturn | Error>(async (resolve) => {
502+
return new Promise<DisassemblyReturn | Error>((resolve) => {
503503
let iter = 0;
504504
const maxTries = Math.ceil((this.maxInstrSize - this.minInstrSize) / this.instrMultiple);
505505
const doWork = () => {

src/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ export function createPortName(procNum: number, prefix: string = 'gdbPort'): str
499499
}
500500

501501
export function getAnyFreePort(preferred: number): Promise<number> {
502-
return new Promise(async (resolve, reject) => {
502+
return new Promise((resolve, reject) => {
503503
function findFreePorts() {
504504
const portFinderOpts = { min: 60000, max: 62000, retrieve: 1, consecutive: false };
505505
TcpPortScanner.findFreePorts(portFinderOpts, GDBServer.LOCALHOST).then((ports) => {

src/frontend/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class CortexDebugExtension {
243243
{
244244
title: 'Cancel'
245245
}
246-
).then(async (v) => {
246+
).then((v) => {
247247
if (v && (v.title === installExt)) {
248248
vscode.commands.executeCommand('workbench.extensions.installExtension', 'mcu-debug.memory-view');
249249
}

src/gdb.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ export class GDBDebugSession extends LoggingDebugSession {
698698
// For now, we unconditionally suppress events because we will recover after we run the post start commands
699699
this.disableSendStoppedEvents = true;
700700
this.sendDummyStackTrace = !attach && (!!this.args.runToEntryPoint || !this.args.breakAfterReset);
701-
this.miDebugger.connect(commands).then(async () => {
701+
this.miDebugger.connect(commands).then(() => {
702702
const mode = attach ? SessionMode.ATTACH : SessionMode.LAUNCH;
703703
this.started = true;
704704
this.serverController.debuggerLaunchCompleted();
@@ -1056,7 +1056,7 @@ export class GDBDebugSession extends LoggingDebugSession {
10561056
}
10571057

10581058
return new Promise<boolean>((resolve, reject) => {
1059-
const doResolve = async () => {
1059+
const doResolve = () => {
10601060
if (this.args.noDebug || (shouldContinue && this.isMIStatusStopped())) {
10611061
if (mode === SessionMode.RESET) {
10621062
this.sendDummyStackTrace = true;

src/openocd.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class OpenOCDServerController extends EventEmitter implements GDBServerCo
416416
if (this.tclSocket) {
417417
return Promise.resolve();
418418
}
419-
return new Promise<void>(async (resolve, reject) => {
419+
return new Promise<void>((resolve, reject) => {
420420
if (this.tclSocket === undefined) {
421421
const tclPortName = createPortName(0, 'tclPort');
422422
const tclPortNum = this.ports[tclPortName];

test/suite/tcpportscanner.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ suite('TcpPortScanner Tests', () => {
6868

6969
// See if the server started on the requested port. We do it two ways in (near) parallel
7070
// Both should succeed with the same timeout. See above when LISTEN starts
71-
TcpPortScanner.waitForPortOpen(port, hostNameOrIp, true, 50, 1000).then(async () => {
71+
TcpPortScanner.waitForPortOpen(port, hostNameOrIp, true, 50, 1000).then(() => {
7272
if (doLog) { console.log(`1. Success server port ${port} is ready ${timeIt()}`); }
7373
}, (err) => {
7474
if (doLog) { console.log(`1. Timeout: Failed waiting on port ${port} to open ${timeIt()}`, err); }

0 commit comments

Comments
 (0)