mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add no-floating-promises to admin-tool-ext-win and query-history (#16944)
This commit is contained in:
13
extensions/admin-tool-ext-win/.eslintrc.json
Normal file
13
extensions/admin-tool-ext-win/.eslintrc.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"parserOptions": {
|
||||||
|
"project": "./extensions/admin-tool-ext-win/tsconfig.json"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-floating-promises": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"ignoreVoid": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -52,7 +52,7 @@ function registerCommands(context: vscode.ExtensionContext): void {
|
|||||||
async function handleLaunchSsmsMinPropertiesDialogCommand(connectionContext?: azdata.ObjectExplorerContext): Promise<void> {
|
async function handleLaunchSsmsMinPropertiesDialogCommand(connectionContext?: azdata.ObjectExplorerContext): Promise<void> {
|
||||||
if (!connectionContext) {
|
if (!connectionContext) {
|
||||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinProperties, 'NoConnectionContext');
|
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinProperties, 'NoConnectionContext');
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForProp', "No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand"));
|
void vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForProp', "No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,11 +64,11 @@ async function handleLaunchSsmsMinPropertiesDialogCommand(connectionContext?: az
|
|||||||
nodeType = connectionContext.nodeInfo.nodeType;
|
nodeType = connectionContext.nodeInfo.nodeType;
|
||||||
} else {
|
} else {
|
||||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinProperties, 'NoOENode');
|
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinProperties, 'NoOENode');
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', "Could not determine Object Explorer node from connectionContext : {0}", JSON.stringify(connectionContext)));
|
void vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', "Could not determine Object Explorer node from connectionContext : {0}", JSON.stringify(connectionContext)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
launchSsmsDialog(
|
return launchSsmsDialog(
|
||||||
nodeTypeToUrnNameMapping[nodeType].action,
|
nodeTypeToUrnNameMapping[nodeType].action,
|
||||||
connectionContext);
|
connectionContext);
|
||||||
}
|
}
|
||||||
@@ -81,10 +81,10 @@ async function handleLaunchSsmsMinGswDialogCommand(connectionContext?: azdata.Ob
|
|||||||
const action = 'GenerateScripts';
|
const action = 'GenerateScripts';
|
||||||
if (!connectionContext) {
|
if (!connectionContext) {
|
||||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinGsw, 'NoConnectionContext');
|
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinGsw, 'NoConnectionContext');
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForGsw', "No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand"));
|
void vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForGsw', "No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand"));
|
||||||
}
|
}
|
||||||
|
|
||||||
launchSsmsDialog(
|
return launchSsmsDialog(
|
||||||
action,
|
action,
|
||||||
connectionContext);
|
connectionContext);
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ async function handleLaunchSsmsMinGswDialogCommand(connectionContext?: azdata.Ob
|
|||||||
async function launchSsmsDialog(action: string, connectionContext: azdata.ObjectExplorerContext): Promise<void> {
|
async function launchSsmsDialog(action: string, connectionContext: azdata.ObjectExplorerContext): Promise<void> {
|
||||||
if (!connectionContext.connectionProfile) {
|
if (!connectionContext.connectionProfile) {
|
||||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinDialog, 'NoConnectionProfile');
|
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinDialog, 'NoConnectionProfile');
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionProfile', "No connectionProfile provided from connectionContext : {0}", JSON.stringify(connectionContext)));
|
void vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionProfile', "No connectionProfile provided from connectionContext : {0}", JSON.stringify(connectionContext)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ async function launchSsmsDialog(action: string, connectionContext: azdata.Object
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinDialog, 'NoOENode');
|
TelemetryReporter.sendErrorEvent(TelemetryViews.SsmsMinDialog, 'NoOENode');
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', "Could not determine Object Explorer node from connectionContext : {0}", JSON.stringify(connectionContext)));
|
void vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', "Could not determine Object Explorer node from connectionContext : {0}", JSON.stringify(connectionContext)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ async function launchSsmsDialog(action: string, connectionContext: azdata.Object
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (err !== '') {
|
if (err !== '') {
|
||||||
vscode.window.showErrorMessage(localize(
|
void vscode.window.showErrorMessage(localize(
|
||||||
'adminToolExtWin.ssmsMinError',
|
'adminToolExtWin.ssmsMinError',
|
||||||
"Error calling SsmsMin with args \'{0}\' - {1}", args, err));
|
"Error calling SsmsMin with args \'{0}\' - {1}", args, err));
|
||||||
}
|
}
|
||||||
|
|||||||
13
extensions/query-history/.eslintrc.json
Normal file
13
extensions/query-history/.eslintrc.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"parserOptions": {
|
||||||
|
"project": "./extensions/query-history/tsconfig.json"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-floating-promises": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"ignoreVoid": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
|||||||
// Currently all the functionality for this is contained within the core ADS
|
// Currently all the functionality for this is contained within the core ADS
|
||||||
// code as the extensibility API doesn't currently support all the required
|
// code as the extensibility API doesn't currently support all the required
|
||||||
// functionality (such as contributing tab panels)
|
// functionality (such as contributing tab panels)
|
||||||
vscode.commands.executeCommand('queryHistory.enableQueryHistory');
|
void vscode.commands.executeCommand('queryHistory.enableQueryHistory');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deactivate(): Promise<void> {
|
export async function deactivate(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user