fix eslint issue

This commit is contained in:
Anthony Dresser
2020-04-22 22:14:22 -07:00
parent 98f2d5510f
commit 6cd2d213ca

View File

@@ -62,9 +62,9 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
if (scenarioType === visualizerExtensions) { if (scenarioType === visualizerExtensions) {
recommendationMessage = localize('VisualizerExtensionsRecommended', "Azure Data Studio has extension recommendations for data visualization.\nOnce installed, you can select the Visualizer icon to visualize your query results."); recommendationMessage = localize('VisualizerExtensionsRecommended', "Azure Data Studio has extension recommendations for data visualization.\nOnce installed, you can select the Visualizer icon to visualize your query results.");
} }
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Promise.all([this.getRecommendedExtensionsByScenario(scenarioType), this.extensionManagementService.getInstalled(ExtensionType.User)]).then(([recommendations, localExtensions]) => { Promise.all([this.getRecommendedExtensionsByScenario(scenarioType), this.extensionManagementService.getInstalled(ExtensionType.User)]).then(([recommendations, localExtensions]) => {
if (!recommendations.every(rec => { return localExtensions.findIndex(local => local.identifier.id.toLocaleLowerCase() === rec.extensionId.toLocaleLowerCase()) !== -1; })) { if (!recommendations.every(rec => { return localExtensions.findIndex(local => local.identifier.id.toLocaleLowerCase() === rec.extensionId.toLocaleLowerCase()) !== -1; })) {
return new Promise<void>(c => {
this.notificationService.prompt( this.notificationService.prompt(
Severity.Info, Severity.Info,
recommendationMessage, recommendationMessage,
@@ -93,7 +93,6 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
const showAction = this.instantiationService.createInstance(ShowRecommendedExtensionsByScenarioAction, scenarioType); const showAction = this.instantiationService.createInstance(ShowRecommendedExtensionsByScenarioAction, scenarioType);
showAction.run(); showAction.run();
showAction.dispose(); showAction.dispose();
c(undefined);
} }
}, { }, {
label: choiceNever, label: choiceNever,
@@ -106,7 +105,6 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
visualizerExtensionNotificationService visualizerExtensionNotificationService
); );
this.storageService.store(storageKey, true, StorageScope.GLOBAL); this.storageService.store(storageKey, true, StorageScope.GLOBAL);
c(undefined);
} }
}], }],
{ {
@@ -118,13 +116,9 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
'CancelButton', 'CancelButton',
visualizerExtensionNotificationService visualizerExtensionNotificationService
); );
c(undefined);
} }
} }
); );
});
} else {
return Promise.resolve();
} }
}); });
} }