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:
Charles Gagnon
2019-10-22 18:56:31 -07:00
committed by GitHub
parent 4c24043cc8
commit 4a68ab4659
91 changed files with 920 additions and 792 deletions

View File

@@ -33,7 +33,7 @@ export class DacFxSummaryPage extends BasePage {
async start(): Promise<boolean> {
this.table = this.view.modelBuilder.table().withProperties({
title: localize('dacfx.summaryTableTitle', 'Summary of settings')
title: localize('dacfx.summaryTableTitle', "Summary of settings")
}).component();
this.loader = this.view.modelBuilder.loadingComponent().withItem(this.table).component();
this.form = this.view.modelBuilder.formContainer().withFormItems(
@@ -76,11 +76,11 @@ export class DacFxSummaryPage extends BasePage {
private populateTable() {
let data = [];
let targetServer = localize('dacfx.targetServerName', 'Target Server');
let targetDatabase = localize('dacfx.targetDatabaseName', 'Target Database');
let sourceServer = localize('dacfx.sourceServerName', 'Source Server');
let sourceDatabase = localize('dacfx.sourceDatabaseName', 'Source Database');
let fileLocation = localize('dacfx.fileLocation', 'File Location');
let targetServer = localize('dacfx.targetServerName', "Target Server");
let targetDatabase = localize('dacfx.targetDatabaseName', "Target Database");
let sourceServer = localize('dacfx.sourceServerName', "Source Server");
let sourceDatabase = localize('dacfx.sourceDatabaseName', "Source Database");
let fileLocation = localize('dacfx.fileLocation', "File Location");
switch (this.instance.selectedOperation) {
case Operation.deploy: {
@@ -94,7 +94,7 @@ export class DacFxSummaryPage extends BasePage {
data = [
[sourceServer, this.model.serverName],
[sourceDatabase, this.model.database],
[localize('dacfxExtract.version', 'Version'), this.model.version],
[localize('dacfxExtract.version', "Version"), this.model.version],
[fileLocation, this.model.filePath]];
break;
}
@@ -125,11 +125,11 @@ export class DacFxSummaryPage extends BasePage {
data: data,
columns: [
{
value: localize('dacfx.settingColumn', 'Setting'),
value: localize('dacfx.settingColumn', "Setting"),
cssClass: 'align-with-header'
},
{
value: localize('dacfx.valueColumn', 'Value'),
value: localize('dacfx.valueColumn', "Value"),
cssClass: 'align-with-header'
}],
width: 700,

View File

@@ -37,7 +37,7 @@ export class DeployConfigPage extends DacFxConfigPage {
let fileBrowserComponent = await this.createFileBrowser();
this.databaseComponent = await this.createDatabaseTextBox(localize('dacFx.databaseNameTextBox', "Database Name"));
this.databaseDropdownComponent = await this.createDeployDatabaseDropdown();
this.databaseDropdownComponent.title = localize('dacFx.databaseNameDropdown', 'Database Name');
this.databaseDropdownComponent.title = localize('dacFx.databaseNameDropdown', "Database Name");
let radioButtons = await this.createRadiobuttons();
this.formBuilder = this.view.modelBuilder.formContainer()
@@ -73,7 +73,7 @@ export class DeployConfigPage extends DacFxConfigPage {
canSelectFolders: false,
canSelectMany: false,
defaultUri: vscode.Uri.file(this.getRootPath()),
openLabel: localize('dacFxDeploy.openFile', 'Open'),
openLabel: localize('dacFxDeploy.openFile', "Open"),
filters: {
'dacpac Files': ['dacpac'],
}
@@ -99,7 +99,7 @@ export class DeployConfigPage extends DacFxConfigPage {
return {
component: this.fileTextBox,
title: localize('dacFxDeploy.fileTextboxTitle', 'File Location'),
title: localize('dacFxDeploy.fileTextboxTitle', "File Location"),
actions: [this.fileButton]
};
}
@@ -108,13 +108,13 @@ export class DeployConfigPage extends DacFxConfigPage {
let upgradeRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'updateExisting',
label: localize('dacFx.upgradeRadioButtonLabel', 'Upgrade Existing Database'),
label: localize('dacFx.upgradeRadioButtonLabel', "Upgrade Existing Database"),
}).component();
let newRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'updateExisting',
label: localize('dacFx.newRadioButtonLabel', 'New Database'),
label: localize('dacFx.newRadioButtonLabel', "New Database"),
}).component();
upgradeRadioButton.onDidClick(() => {
@@ -158,7 +158,7 @@ export class DeployConfigPage extends DacFxConfigPage {
return {
component: flexRadioButtonsModel,
title: localize('dacFx.targetDatabaseRadioButtonsTitle', 'Target Database')
title: localize('dacFx.targetDatabaseRadioButtonsTitle', "Target Database")
};
}

View File

@@ -106,7 +106,7 @@ export class DeployPlanPage extends DacFxConfigPage {
if (result.dataLossAlerts.size > 0) {
// update message to list how many operations could result in data loss
this.dataLossText.updateProperties({
value: localize('dacfx.dataLossTextWithCount', '{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.', result.dataLossAlerts.size)
value: localize('dacfx.dataLossTextWithCount', "{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.", result.dataLossAlerts.size)
});
this.dataLossCheckbox.enabled = true;
} else {
@@ -121,7 +121,7 @@ export class DeployPlanPage extends DacFxConfigPage {
this.dataLossCheckbox = this.view.modelBuilder.checkBox()
.withValidation(component => component.checked === true)
.withProperties({
label: localize('dacFx.dataLossCheckbox', 'Proceed despite possible data loss'),
label: localize('dacFx.dataLossCheckbox', "Proceed despite possible data loss"),
}).component();
return {
@@ -134,7 +134,7 @@ export class DeployPlanPage extends DacFxConfigPage {
private async createNoDataLossText(): Promise<azdata.FormComponent> {
let noDataLossText = this.view.modelBuilder.text()
.withProperties({
value: localize('dacfx.noDataLossText', 'No data loss will occur from the listed deploy actions.')
value: localize('dacfx.noDataLossText', "No data loss will occur from the listed deploy actions.")
}).component();
return {
@@ -147,7 +147,7 @@ export class DeployPlanPage extends DacFxConfigPage {
let dataLossComponent = await this.createDataLossCheckbox();
this.dataLossText = this.view.modelBuilder.text()
.withProperties({
value: localize('dacfx.dataLossText', 'The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.')
value: localize('dacfx.dataLossText', "The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.")
}).component();
return {
@@ -180,31 +180,31 @@ export class DeployPlanPage extends DacFxConfigPage {
private getTableColumns(dataloss: boolean): azdata.TableColumn[] {
let columns: azdata.TableColumn[] = [
{
value: localize('dacfx.operationColumn', 'Operation'),
value: localize('dacfx.operationColumn', "Operation"),
width: 75,
cssClass: 'align-with-header',
toolTip: localize('dacfx.operationTooltip', 'Operation(Create, Alter, Delete) that will occur during deployment')
toolTip: localize('dacfx.operationTooltip', "Operation(Create, Alter, Delete) that will occur during deployment")
},
{
value: localize('dacfx.typeColumn', 'Type'),
value: localize('dacfx.typeColumn', "Type"),
width: 100,
cssClass: 'align-with-header',
toolTip: localize('dacfx.typeTooltip', 'Type of object that will be affected by deployment')
toolTip: localize('dacfx.typeTooltip', "Type of object that will be affected by deployment")
},
{
value: localize('dacfx.objectColumn', 'Object'),
value: localize('dacfx.objectColumn', "Object"),
width: 300,
cssClass: 'align-with-header',
toolTip: localize('dacfx.objecTooltip', 'Name of object that will be affected by deployment')
toolTip: localize('dacfx.objecTooltip', "Name of object that will be affected by deployment")
}];
if (dataloss) {
columns.unshift(
{
value: localize('dacfx.dataLossColumn', 'Data Loss'),
value: localize('dacfx.dataLossColumn', "Data Loss"),
width: 50,
cssClass: 'center-align',
toolTip: localize('dacfx.dataLossTooltip', 'Operations that may result in data loss are marked with a warning sign')
toolTip: localize('dacfx.dataLossTooltip', "Operations that may result in data loss are marked with a warning sign")
});
}
return columns;

View File

@@ -78,7 +78,7 @@ export class ExportConfigPage extends DacFxConfigPage {
let fileUri = await vscode.window.showSaveDialog(
{
defaultUri: vscode.Uri.file(this.fileTextBox.value),
saveLabel: localize('dacfxExport.saveFile', 'Save'),
saveLabel: localize('dacfxExport.saveFile', "Save"),
filters: {
'bacpac Files': ['bacpac'],
}
@@ -99,7 +99,7 @@ export class ExportConfigPage extends DacFxConfigPage {
return {
component: this.fileTextBox,
title: localize('dacFxExport.fileTextboxTitle', 'File Location'),
title: localize('dacFxExport.fileTextboxTitle', "File Location"),
actions: [this.fileButton]
};
}

View File

@@ -80,7 +80,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
let fileUri = await vscode.window.showSaveDialog(
{
defaultUri: vscode.Uri.file(this.fileTextBox.value),
saveLabel: localize('dacfxExtract.saveFile', 'Save'),
saveLabel: localize('dacfxExtract.saveFile', "Save"),
filters: {
'dacpac Files': ['dacpac'],
}
@@ -101,7 +101,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
return {
component: this.fileTextBox,
title: localize('dacFxExtract.fileTextboxTitle', 'File Location'),
title: localize('dacFxExtract.fileTextboxTitle', "File Location"),
actions: [this.fileButton]
};
}
@@ -109,7 +109,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
private async createVersionTextBox(): Promise<azdata.FormComponent> {
this.versionTextBox = this.view.modelBuilder.inputBox().withProperties({
required: true,
ariaLabel: localize('dacFxExtract.versionTextBoxAriaLabel', 'Version')
ariaLabel: localize('dacFxExtract.versionTextBoxAriaLabel', "Version")
}).component();
// default version
@@ -122,7 +122,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
return {
component: this.versionTextBox,
title: localize('dacFxExtract.versionTextboxTitle', 'Version (use x.x.x.x where x is a number)'),
title: localize('dacFxExtract.versionTextboxTitle', "Version (use x.x.x.x where x is a number)"),
};
}
}

View File

@@ -63,7 +63,7 @@ export class ImportConfigPage extends DacFxConfigPage {
canSelectFolders: false,
canSelectMany: false,
defaultUri: vscode.Uri.file(this.getRootPath()),
openLabel: localize('dacFxImport.openFile', 'Open'),
openLabel: localize('dacFxImport.openFile', "Open"),
filters: {
'bacpac Files': ['bacpac'],
}
@@ -89,7 +89,7 @@ export class ImportConfigPage extends DacFxConfigPage {
return {
component: this.fileTextBox,
title: localize('dacFxImport.fileTextboxTitle', 'File Location'),
title: localize('dacFxImport.fileTextboxTitle', "File Location"),
actions: [this.fileButton]
};
}

View File

@@ -67,7 +67,7 @@ export class SelectOperationPage extends BasePage {
this.deployRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'selectedOperation',
label: localize('dacFx.deployRadioButtonLabel', 'Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]'),
label: localize('dacFx.deployRadioButtonLabel', "Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]"),
}).component();
this.deployRadioButton.onDidClick(() => {
@@ -94,7 +94,7 @@ export class SelectOperationPage extends BasePage {
this.extractRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'selectedOperation',
label: localize('dacFx.extractRadioButtonLabel', 'Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]'),
label: localize('dacFx.extractRadioButtonLabel', "Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]"),
}).component();
this.extractRadioButton.onDidClick(() => {
@@ -119,7 +119,7 @@ export class SelectOperationPage extends BasePage {
this.importRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'selectedOperation',
label: localize('dacFx.importRadioButtonLabel', 'Create a database from a .bacpac file [Import Bacpac]'),
label: localize('dacFx.importRadioButtonLabel', "Create a database from a .bacpac file [Import Bacpac]"),
}).component();
this.importRadioButton.onDidClick(() => {
@@ -144,7 +144,7 @@ export class SelectOperationPage extends BasePage {
this.exportRadioButton = this.view.modelBuilder.radioButton()
.withProperties({
name: 'selectedOperation',
label: localize('dacFx.exportRadioButtonLabel', 'Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]'),
label: localize('dacFx.exportRadioButtonLabel', "Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]"),
}).component();
this.exportRadioButton.onDidClick(() => {