mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-01 01:20:31 -04:00
Hygiene linting for extensions + new rule (#7843)
* linting for extensions + new rule * Remove unneeded array * Fix spelling mistake * Fix bad merge
This commit is contained in:
@@ -150,7 +150,7 @@ export class AzureAccountProvider implements azdata.AccountProvider {
|
||||
private doIfInitialized<T>(op: () => Promise<T>): Promise<T> {
|
||||
return this._isInitialized
|
||||
? op()
|
||||
: Promise.reject(localize('accountProviderNotInitialized', 'Account provider not initialized, cannot perform action'));
|
||||
: Promise.reject(localize('accountProviderNotInitialized', "Account provider not initialized, cannot perform action"));
|
||||
}
|
||||
|
||||
private getAccessTokens(account: AzureAccount, resource: azdata.AzureResource): Promise<AzureAccountSecurityTokenCollection> {
|
||||
@@ -235,8 +235,8 @@ export class AzureAccountProvider implements azdata.AccountProvider {
|
||||
// 2) Begin the acquiring token polling
|
||||
// 3) When that completes via callback, close the auto oauth
|
||||
let title = isAddAccount ?
|
||||
localize('addAccount', 'Add {0} account', self._metadata.displayName) :
|
||||
localize('refreshAccount', 'Refresh {0} account', self._metadata.displayName);
|
||||
localize('addAccount', "Add {0} account", self._metadata.displayName) :
|
||||
localize('refreshAccount', "Refresh {0} account", self._metadata.displayName);
|
||||
return azdata.accounts.beginAutoOAuthDeviceCode(self._metadata.id, title, oAuth.userCodeInfo.message, oAuth.userCodeInfo.userCode, oAuth.userCodeInfo.verificationUrl)
|
||||
.then(() => {
|
||||
return new Promise<adal.TokenResponse | azdata.PromptFailedResult>((resolve, reject) => {
|
||||
@@ -293,7 +293,7 @@ export class AzureAccountProvider implements azdata.AccountProvider {
|
||||
userId: userId,
|
||||
displayName: tenantDetails.length && tenantDetails[0].displayName
|
||||
? tenantDetails[0].displayName
|
||||
: localize('azureWorkAccountDisplayName', 'Work or school account')
|
||||
: localize('azureWorkAccountDisplayName', "Work or school account")
|
||||
};
|
||||
});
|
||||
});
|
||||
@@ -410,7 +410,7 @@ export class AzureAccountProvider implements azdata.AccountProvider {
|
||||
|
||||
// Calculate the home tenant display name to use for the contextual display name
|
||||
let contextualDisplayName = msa
|
||||
? localize('microsoftAccountDisplayName', 'Microsoft Account')
|
||||
? localize('microsoftAccountDisplayName', "Microsoft Account")
|
||||
: tenants[0].displayName;
|
||||
|
||||
// Calculate the account type
|
||||
|
||||
@@ -78,11 +78,11 @@ export class AzureAccountProviderService implements vscode.Disposable {
|
||||
return Promise.all(promises)
|
||||
.then(
|
||||
() => {
|
||||
let message = localize('clearTokenCacheSuccess', 'Token cache successfully cleared');
|
||||
let message = localize('clearTokenCacheSuccess', "Token cache successfully cleared");
|
||||
vscode.window.showInformationMessage(`${constants.extensionName}: ${message}`);
|
||||
},
|
||||
err => {
|
||||
let message = localize('clearTokenCacheFailure', 'Failed to clear token cache');
|
||||
let message = localize('clearTokenCacheFailure', "Failed to clear token cache");
|
||||
vscode.window.showErrorMessage(`${constants.extensionName}: ${message}: ${err}`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ const localize = nls.loadMessageBundle();
|
||||
const publicAzureSettings: ProviderSettings = {
|
||||
configKey: 'enablePublicCloud',
|
||||
metadata: {
|
||||
displayName: localize('publicCloudDisplayName', 'Azure'),
|
||||
displayName: localize('publicCloudDisplayName', "Azure"),
|
||||
id: 'azurePublicCloud',
|
||||
settings: {
|
||||
host: 'https://login.microsoftonline.com/',
|
||||
|
||||
Reference in New Issue
Block a user