ESlint: enable no-async-promise-executor (#134873)

This commit is contained in:
Benjamin Pasero
2021-10-12 10:50:44 +02:00
parent 0d803d3e51
commit 3cda269c80
35 changed files with 66 additions and 34 deletions
@@ -24,6 +24,7 @@ let outputChannel: vscode.OutputChannel;
export function activate(context: vscode.ExtensionContext) {
function doResolve(_authority: string, progress: vscode.Progress<{ message?: string; increment?: number }>): Promise<vscode.ResolvedAuthority> {
// eslint-disable-next-line no-async-promise-executor
const serverPromise = new Promise<vscode.ResolvedAuthority>(async (res, rej) => {
progress.report({ message: 'Starting Test Resolver' });
outputChannel = vscode.window.createOutputChannel('TestResolver');
@@ -129,6 +130,7 @@ export function activate(context: vscode.ExtensionContext) {
});
});
return serverPromise.then(serverAddr => {
// eslint-disable-next-line no-async-promise-executor
return new Promise<vscode.ResolvedAuthority>(async (res, _rej) => {
const proxyServer = net.createServer(proxySocket => {
outputChannel.appendLine(`Proxy connection accepted`);