Remove unnecessary awaits from extensions (#19571)

* Remove unnecessary awaits

* fix ignore

* revert eslintignore

* try

* increase size

* Increase sql lint size
This commit is contained in:
Charles Gagnon
2022-05-31 15:36:44 -07:00
committed by GitHub
parent 96f345a74a
commit 6ae380b65d
65 changed files with 179 additions and 100 deletions

View File

@@ -1,4 +1,7 @@
{
"parserOptions": {
"project": "./extensions/machine-learning/tsconfig.json"
},
"rules": {
"@typescript-eslint/explicit-function-return-type": ["off"]
}

View File

@@ -164,7 +164,7 @@ export class DeployedModelService {
// If database exist verify the table schema
//
if ((await databases).find(x => x === table.databaseName)) {
if (databases.find(x => x === table.databaseName)) {
const query = queries.getConfigTableVerificationQuery(table);
const result = await this._queryRunner.runWithDatabaseChange(connection, query, table.databaseName);
return result !== undefined && result.rows.length > 0 && result.rows[0][0].displayValue === '1';

View File

@@ -27,7 +27,7 @@ export class CurrentLanguagesTab extends LanguageViewBase {
// TODO: only supporting single location for now. We should add a drop down for multi locations mode
//
let locationTitle = await this.getServerTitle();
let locationTitle = this.getServerTitle();
this._locationComponent = view.modelBuilder.text().withProps({
value: locationTitle
}).component();

View File

@@ -66,7 +66,7 @@ export class AzureResourceFilterComponent extends ModelViewBase implements IData
});
this._workspaces.onValueChanged(async (newValue) => {
if (newValue.selected !== (<azdata.CategoryValue>this._workspaces.value)?.name) {
await this.onWorkspaceSelectedChanged();
this.onWorkspaceSelectedChanged();
}
});

View File

@@ -114,7 +114,7 @@ export class ImportModelWizard extends ModelViewBase {
return true;
} catch (error) {
await this.showErrorMessage(`${constants.modelFailedToRegister} ${constants.getErrorMessage(error)}`);
this.showErrorMessage(`${constants.modelFailedToRegister} ${constants.getErrorMessage(error)}`);
return false;
}
}

View File

@@ -217,7 +217,7 @@ export abstract class ModelViewBase extends ViewBase {
* Stores the name of the table as recent config table for importing models
*/
public async storeImportConfigTable(): Promise<void> {
await this.sendRequest(StoreImportTableEventName, this.importTable);
this.sendRequest(StoreImportTableEventName, this.importTable);
}
/**