mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
ESlint: enable no-async-promise-executor (#134873)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"no-duplicate-case": "warn",
|
||||
"no-duplicate-imports": "warn",
|
||||
"no-eval": "warn",
|
||||
"no-async-promise-executor": "warn",
|
||||
"no-extra-semi": "warn",
|
||||
"no-new-wrappers": "warn",
|
||||
"no-redeclare": "off",
|
||||
|
||||
@@ -316,6 +316,7 @@ export class AzureActiveDirectoryService {
|
||||
Logger.info('Warning: The \'offline_access\' scope was not included, so the generated token will not be able to be refreshed.');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const runsRemote = vscode.env.remoteName !== undefined;
|
||||
const runsServerless = vscode.env.remoteName === undefined && vscode.env.uiKind === vscode.UIKind.Web;
|
||||
|
||||
@@ -174,6 +174,7 @@ export default class PHPValidationProvider {
|
||||
}
|
||||
|
||||
private doValidate(textDocument: vscode.TextDocument): Promise<void> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<void>(async (resolve) => {
|
||||
const executable = this.config!.executable;
|
||||
if (!executable) {
|
||||
|
||||
@@ -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`);
|
||||
|
||||
@@ -1321,6 +1321,7 @@ export namespace Promises {
|
||||
* cannot be used (e.g. when callbacks are involved that require this).
|
||||
*/
|
||||
export function withAsyncBody<T, E = Error>(bodyFn: (resolve: (value: T) => unknown, reject: (error: E) => unknown) => Promise<unknown>): Promise<T> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<T>(async (resolve, reject) => {
|
||||
try {
|
||||
await bodyFn(resolve, reject);
|
||||
|
||||
@@ -17,6 +17,7 @@ function validateMacAddress(candidate: string): boolean {
|
||||
}
|
||||
|
||||
export function getMac(): Promise<string> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const timeout = setTimeout(() => reject('Unable to retrieve mac address (timeout after 10s)'), 10000);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createHash } from 'crypto';
|
||||
import { Promises } from 'vs/base/common/async';
|
||||
import { listenStream } from 'vs/base/common/stream';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IChecksumService } from 'vs/platform/checksum/common/checksumService';
|
||||
@@ -16,10 +15,10 @@ export class ChecksumService implements IChecksumService {
|
||||
|
||||
constructor(@IFileService private readonly fileService: IFileService) { }
|
||||
|
||||
checksum(resource: URI): Promise<string> {
|
||||
return Promises.withAsyncBody<string>(async (resolve, reject) => {
|
||||
async checksum(resource: URI): Promise<string> {
|
||||
const stream = (await this.fileService.readFileStream(resource)).value;
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
const hash = createHash('md5');
|
||||
const stream = (await this.fileService.readFileStream(resource)).value;
|
||||
|
||||
listenStream(stream, {
|
||||
onData: data => hash.update(data.buffer),
|
||||
|
||||
@@ -89,12 +89,12 @@ suite('ConfigurationService', () => {
|
||||
test('trigger configuration change event when file does not exist', async () => {
|
||||
const testObject = disposables.add(new ConfigurationService(settingsResource, fileService));
|
||||
await testObject.initialize();
|
||||
return new Promise<void>(async (c) => {
|
||||
return new Promise<void>((c, e) => {
|
||||
disposables.add(Event.filter(testObject.onDidChangeConfiguration, e => e.source === ConfigurationTarget.USER)(() => {
|
||||
assert.strictEqual(testObject.getValue('foo'), 'bar');
|
||||
c();
|
||||
}));
|
||||
await fileService.writeFile(settingsResource, VSBuffer.fromString('{ "foo": "bar" }'));
|
||||
fileService.writeFile(settingsResource, VSBuffer.fromString('{ "foo": "bar" }')).catch(e);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -66,6 +66,7 @@ export async function collectWorkspaceStats(folder: string, filter: string[]): P
|
||||
function collect(root: string, dir: string, filter: string[], token: { count: number, maxReached: boolean }): Promise<void> {
|
||||
const relativePath = dir.substring(root.length + 1);
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async resolve => {
|
||||
let files: IDirent[];
|
||||
try {
|
||||
|
||||
@@ -100,26 +100,26 @@ export async function resolveShellEnv(logService: ILogService, args: NativeParse
|
||||
}
|
||||
|
||||
async function doResolveUnixShellEnv(logService: ILogService, token: CancellationToken): Promise<typeof process.env> {
|
||||
return Promises.withAsyncBody<typeof process.env, Error>(async (resolve, reject) => {
|
||||
const runAsNode = process.env['ELECTRON_RUN_AS_NODE'];
|
||||
logService.trace('getUnixShellEnvironment#runAsNode', runAsNode);
|
||||
const runAsNode = process.env['ELECTRON_RUN_AS_NODE'];
|
||||
logService.trace('getUnixShellEnvironment#runAsNode', runAsNode);
|
||||
|
||||
const noAttach = process.env['ELECTRON_NO_ATTACH_CONSOLE'];
|
||||
logService.trace('getUnixShellEnvironment#noAttach', noAttach);
|
||||
const noAttach = process.env['ELECTRON_NO_ATTACH_CONSOLE'];
|
||||
logService.trace('getUnixShellEnvironment#noAttach', noAttach);
|
||||
|
||||
const mark = generateUuid().replace(/-/g, '').substr(0, 12);
|
||||
const regex = new RegExp(mark + '(.*)' + mark);
|
||||
const mark = generateUuid().replace(/-/g, '').substr(0, 12);
|
||||
const regex = new RegExp(mark + '(.*)' + mark);
|
||||
|
||||
const env = {
|
||||
...process.env,
|
||||
ELECTRON_RUN_AS_NODE: '1',
|
||||
ELECTRON_NO_ATTACH_CONSOLE: '1'
|
||||
};
|
||||
const env = {
|
||||
...process.env,
|
||||
ELECTRON_RUN_AS_NODE: '1',
|
||||
ELECTRON_NO_ATTACH_CONSOLE: '1'
|
||||
};
|
||||
|
||||
logService.trace('getUnixShellEnvironment#env', env);
|
||||
const systemShellUnix = await getSystemShell(OS, env);
|
||||
logService.trace('getUnixShellEnvironment#shell', systemShellUnix);
|
||||
logService.trace('getUnixShellEnvironment#env', env);
|
||||
const systemShellUnix = await getSystemShell(OS, env);
|
||||
logService.trace('getUnixShellEnvironment#shell', systemShellUnix);
|
||||
|
||||
return new Promise<typeof process.env>((resolve, reject) => {
|
||||
if (token.isCancellationRequested) {
|
||||
return reject(canceled());
|
||||
}
|
||||
|
||||
@@ -273,6 +273,7 @@ export class LinuxExternalTerminalService extends ExternalTerminalService implem
|
||||
|
||||
public static async getDefaultTerminalLinuxReady(): Promise<string> {
|
||||
if (!LinuxExternalTerminalService._DEFAULT_TERMINAL_LINUX_READY) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
LinuxExternalTerminalService._DEFAULT_TERMINAL_LINUX_READY = new Promise(async r => {
|
||||
if (env.isLinux) {
|
||||
const isDebian = await pfs.Promises.exists('/etc/debian_version');
|
||||
|
||||
@@ -218,6 +218,7 @@ export abstract class AbstractTunnelService implements ITunnelService {
|
||||
}
|
||||
|
||||
public get tunnels(): Promise<readonly RemoteTunnel[]> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve) => {
|
||||
const tunnels: RemoteTunnel[] = [];
|
||||
const tunnelArray = Array.from(this._tunnels.values());
|
||||
|
||||
@@ -98,6 +98,7 @@ export class RequestService extends Disposable implements IRequestService {
|
||||
|
||||
private _request(options: NodeRequestOptions, token: CancellationToken): Promise<IRequestContext> {
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<IRequestContext>(async (c, e) => {
|
||||
let req: http.ClientRequest;
|
||||
|
||||
|
||||
@@ -287,12 +287,13 @@ export class IndexedDBStorageDatabase extends Disposable implements IIndexedDBSt
|
||||
});
|
||||
}
|
||||
|
||||
getItems(): Promise<Map<string, string>> {
|
||||
return Promises.withAsyncBody<Map<string, string>>(async resolve => {
|
||||
async getItems(): Promise<Map<string, string>> {
|
||||
const db = await this.whenConnected;
|
||||
|
||||
return new Promise<Map<string, string>>(resolve => {
|
||||
const items = new Map<string, string>();
|
||||
|
||||
// Open a IndexedDB Cursor to iterate over key/values
|
||||
const db = await this.whenConnected;
|
||||
const transaction = db.transaction(IndexedDBStorageDatabase.STORAGE_OBJECT_STORE, 'readonly');
|
||||
const objectStore = transaction.objectStore(IndexedDBStorageDatabase.STORAGE_OBJECT_STORE);
|
||||
const cursor = objectStore.openCursor();
|
||||
@@ -361,9 +362,8 @@ export class IndexedDBStorageDatabase extends Disposable implements IIndexedDBSt
|
||||
}
|
||||
|
||||
// Update `ItemTable` with inserts and/or deletes
|
||||
return Promises.withAsyncBody<boolean, DOMException | null>(async (resolve, reject) => {
|
||||
const db = await this.whenConnected;
|
||||
|
||||
const db = await this.whenConnected;
|
||||
return new Promise<boolean>((resolve, reject) => {
|
||||
const transaction = db.transaction(IndexedDBStorageDatabase.STORAGE_OBJECT_STORE, 'readwrite');
|
||||
transaction.oncomplete = () => resolve(true);
|
||||
transaction.onerror = () => reject(transaction.error);
|
||||
@@ -396,10 +396,10 @@ export class IndexedDBStorageDatabase extends Disposable implements IIndexedDBSt
|
||||
return db.close();
|
||||
}
|
||||
|
||||
clear(): Promise<void> {
|
||||
return Promises.withAsyncBody<void, DOMException | null>(async (resolve, reject) => {
|
||||
const db = await this.whenConnected;
|
||||
async clear(): Promise<void> {
|
||||
const db = await this.whenConnected;
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const transaction = db.transaction(IndexedDBStorageDatabase.STORAGE_OBJECT_STORE, 'readwrite');
|
||||
transaction.oncomplete = () => resolve();
|
||||
transaction.onerror = () => reject(transaction.error);
|
||||
|
||||
@@ -104,6 +104,7 @@ export class PtyService extends Disposable implements IPtyService {
|
||||
const promises: Promise<ISerializedTerminalState>[] = [];
|
||||
for (const [persistentProcessId, persistentProcess] of this._ptys.entries()) {
|
||||
if (ids.indexOf(persistentProcessId) !== -1) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
promises.push(new Promise<ISerializedTerminalState>(async r => {
|
||||
r({
|
||||
id: persistentProcessId,
|
||||
|
||||
@@ -128,6 +128,7 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe
|
||||
if (this._currentRequest) {
|
||||
return this._currentRequest;
|
||||
}
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
this._currentRequest = new Promise<string>(async resolve => {
|
||||
if (!windowsProcessTree) {
|
||||
windowsProcessTree = await import('windows-process-tree');
|
||||
|
||||
@@ -140,6 +140,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
|
||||
isExtensionOwnedTerminal: launchConfig.isExtensionOwnedTerminal,
|
||||
useShellEnvironment: launchConfig.useShellEnvironment,
|
||||
};
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const terminal = new Promise<ITerminalInstance>(async r => {
|
||||
const terminal = await this._terminalService.createTerminal({
|
||||
config: shellLaunchConfig,
|
||||
|
||||
@@ -642,6 +642,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const createdResult: Promise<TaskExecutionImpl> = new Promise(async (resolve, reject) => {
|
||||
const taskToCreate = task ? task : await TaskDTO.to(execution.task, this._workspaceProvider, this._providedCustomExecutions2);
|
||||
if (!taskToCreate) {
|
||||
|
||||
@@ -716,6 +716,7 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
|
||||
const promises: vscode.ProviderResult<{ provider: vscode.TerminalLinkProvider, links: vscode.TerminalLink[] }>[] = [];
|
||||
|
||||
for (const provider of this._linkProviders) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
promises.push(new Promise(async r => {
|
||||
cancellationSource.token.onCancellationRequested(() => r({ provider, links: [] }));
|
||||
const links = (await provider.provideTerminalLinks(context, cancellationSource.token)) || [];
|
||||
|
||||
@@ -919,6 +919,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
||||
|
||||
return {
|
||||
markdown: (token: CancellationToken): Promise<IMarkdownString | string | undefined> => {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<IMarkdownString | string | undefined>(async (resolve) => {
|
||||
await node.resolve(token);
|
||||
resolve(node.tooltip);
|
||||
|
||||
@@ -429,6 +429,7 @@ export class BulkEditPreviewProvider implements ITextModelContentProvider {
|
||||
// this is a little weird but otherwise editors and other cusomers
|
||||
// will dispose my models before they should be disposed...
|
||||
// And all of this is off the eventloop to prevent endless recursion
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
new Promise(async () => this._disposables.add(await this._textModelResolverService.createModelReference(model!.uri)));
|
||||
}
|
||||
return model;
|
||||
|
||||
@@ -200,6 +200,7 @@ export class DebugTaskRunner {
|
||||
return taskPromise.then(withUndefinedAsNull);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (c, e) => {
|
||||
const waitForInput = new Promise<void>(resolve => once(e => (e.kind === TaskEventKind.AcquiredInput) && e.taskId === task._id, this.taskService.onDidStateChange)(() => {
|
||||
resolve();
|
||||
|
||||
@@ -53,6 +53,7 @@ export function hasChildProcesses(processId: number | undefined): Promise<boolea
|
||||
|
||||
// if shell has at least one child process, assume that shell is busy
|
||||
if (platform.isWindows) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<boolean>(async (resolve) => {
|
||||
// See #123296
|
||||
const windowsProcessTree = await import('windows-process-tree');
|
||||
|
||||
@@ -222,6 +222,7 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I
|
||||
}
|
||||
|
||||
loadModel(): Promise<ITextModel> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
this.loadModelPromise = new Promise<ITextModel>(async (c, e) => {
|
||||
try {
|
||||
let content = '';
|
||||
|
||||
@@ -225,6 +225,7 @@ export class DefineKeybindingWidget extends Widget {
|
||||
|
||||
define(): Promise<string | null> {
|
||||
this._keybindingInputWidget.clear();
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<string | null>(async (c) => {
|
||||
if (!this._isVisible) {
|
||||
this._isVisible = true;
|
||||
|
||||
@@ -265,6 +265,7 @@ class HelpItemValue {
|
||||
constructor(private commandService: ICommandService, public extensionDescription: IExtensionDescription, public remoteAuthority: string[] | undefined, private urlOrCommand?: string) { }
|
||||
|
||||
get url(): Promise<string> {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<string>(async (resolve) => {
|
||||
if (this._url === undefined) {
|
||||
if (this.urlOrCommand) {
|
||||
|
||||
@@ -51,6 +51,7 @@ export class TunnelFactoryContribution extends Disposable implements IWorkbenchC
|
||||
logService.trace('tunnelFactory: tunnel provider error');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve) => {
|
||||
if (!tunnelPromise) {
|
||||
resolve(undefined);
|
||||
|
||||
@@ -90,6 +90,7 @@ class InsertSnippetAction extends EditorAction {
|
||||
const clipboardService = accessor.get(IClipboardService);
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const snippet = await new Promise<Snippet | undefined>(async (resolve) => {
|
||||
|
||||
const { lineNumber, column } = editor.getPosition();
|
||||
|
||||
@@ -926,6 +926,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
throw new TaskError(Severity.Info, nls.localize('TaskServer.noTask', 'Task to execute is undefined'), TaskErrors.TaskNotFound);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<ITaskSummary | undefined>(async (resolve) => {
|
||||
let resolver = this.createResolver();
|
||||
if (options && options.attachProblemMatcher && this.shouldAttachProblemMatcher(task) && !InMemoryTask.is(task)) {
|
||||
@@ -2360,6 +2361,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
}
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const timeout: boolean = await Promise.race([new Promise<boolean>(async (resolve) => {
|
||||
await _createEntries;
|
||||
resolve(false);
|
||||
@@ -3034,6 +3036,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const timeout: boolean = await Promise.race([new Promise<boolean>(async (resolve) => {
|
||||
await entries;
|
||||
resolve(false);
|
||||
|
||||
@@ -596,6 +596,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
||||
if (xtermConstructor) {
|
||||
return xtermConstructor;
|
||||
}
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
xtermConstructor = new Promise<typeof XTermTerminal>(async (resolve) => {
|
||||
const Terminal = await this._terminalInstanceService.getXtermConstructor();
|
||||
// Localize strings
|
||||
|
||||
@@ -54,6 +54,7 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
|
||||
private async textBufferFactoryFromResource(resource: URI): Promise<ITextBufferFactory> {
|
||||
let ongoing = this.loads.get(resource.toString());
|
||||
if (!ongoing) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
ongoing = new Promise(async c => {
|
||||
c(createTextBufferFactory(await requireToContent(this.instantiationService, resource)));
|
||||
this.loads.delete(resource.toString());
|
||||
|
||||
@@ -280,6 +280,7 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
|
||||
}
|
||||
const trusted = this.workspaceTrustManagementService.isWorkspaceTrusted();
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return e.join(new Promise(async resolve => {
|
||||
// Workspace is trusted and there are added/changed folders
|
||||
if (trusted && (e.changes.added.length || e.changes.changed.length)) {
|
||||
|
||||
@@ -1113,14 +1113,14 @@ suite('WorkspaceConfigurationService - Folder', () => {
|
||||
test('creating workspace settings', async () => {
|
||||
await fileService.writeFile(environmentService.settingsResource, VSBuffer.fromString('{ "configurationService.folder.testSetting": "userValue" }'));
|
||||
await testObject.reloadConfiguration();
|
||||
await new Promise<void>(async (c) => {
|
||||
await new Promise<void>((c, e) => {
|
||||
const disposable = testObject.onDidChangeConfiguration(e => {
|
||||
assert.ok(e.affectsConfiguration('configurationService.folder.testSetting'));
|
||||
assert.strictEqual(testObject.getValue('configurationService.folder.testSetting'), 'workspaceValue');
|
||||
disposable.dispose();
|
||||
c();
|
||||
});
|
||||
await fileService.writeFile(joinPath(workspaceService.getWorkspace().folders[0].uri, '.vscode', 'settings.json'), VSBuffer.fromString('{ "configurationService.folder.testSetting": "workspaceValue" }'));
|
||||
fileService.writeFile(joinPath(workspaceService.getWorkspace().folders[0].uri, '.vscode', 'settings.json'), VSBuffer.fromString('{ "configurationService.folder.testSetting": "workspaceValue" }')).catch(e);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1129,9 +1129,9 @@ suite('WorkspaceConfigurationService - Folder', () => {
|
||||
const workspaceSettingsResource = joinPath(workspaceService.getWorkspace().folders[0].uri, '.vscode', 'settings.json');
|
||||
await fileService.writeFile(workspaceSettingsResource, VSBuffer.fromString('{ "configurationService.folder.testSetting": "workspaceValue" }'));
|
||||
await testObject.reloadConfiguration();
|
||||
const e = await new Promise<IConfigurationChangeEvent>(async (c) => {
|
||||
const e = await new Promise<IConfigurationChangeEvent>((c, e) => {
|
||||
Event.once(testObject.onDidChangeConfiguration)(c);
|
||||
await fileService.del(workspaceSettingsResource);
|
||||
fileService.del(workspaceSettingsResource).catch(e);
|
||||
});
|
||||
assert.ok(e.affectsConfiguration('configurationService.folder.testSetting'));
|
||||
assert.strictEqual(testObject.getValue('configurationService.folder.testSetting'), 'userValue');
|
||||
|
||||
@@ -266,6 +266,7 @@ export class SimpleFileDialog {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise<URI | undefined>(async (resolve) => {
|
||||
this.filePickBox = this.quickInputService.createQuickPick<FileQuickPickItem>();
|
||||
this.busy = true;
|
||||
|
||||
@@ -216,6 +216,7 @@ export class LocalFileSearchSimpleWorker implements ILocalFileSearchSimpleWorker
|
||||
}));
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
const entries = new Promise<(FileNode | DirNode)[]>(async c => {
|
||||
const files: FileNode[] = [];
|
||||
const dirs: Promise<DirNode>[] = [];
|
||||
|
||||
Reference in New Issue
Block a user