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

@@ -97,7 +97,7 @@ export class FileConfigPage extends ImportPage {
return {
component: this.serverDropdown,
title: localize('flatFileImport.serverDropdownTitle', 'Server the database is in')
title: localize('flatFileImport.serverDropdownTitle', "Server the database is in")
};
}
@@ -132,7 +132,7 @@ export class FileConfigPage extends ImportPage {
return {
component: this.databaseLoader,
title: localize('flatFileImport.databaseDropdownTitle', 'Database the table is created in')
title: localize('flatFileImport.databaseDropdownTitle', "Database the table is created in")
};
}
@@ -164,7 +164,7 @@ export class FileConfigPage extends ImportPage {
required: true
}).component();
this.fileButton = this.view.modelBuilder.button().withProperties({
label: localize('flatFileImport.browseFiles', 'Browse'),
label: localize('flatFileImport.browseFiles', "Browse"),
}).component();
this.fileButton.onDidClick(async (click) => {
@@ -173,7 +173,7 @@ export class FileConfigPage extends ImportPage {
canSelectFiles: true,
canSelectFolders: false,
canSelectMany: false,
openLabel: localize('flatFileImport.openFile', 'Open'),
openLabel: localize('flatFileImport.openFile', "Open"),
filters: {
'CSV/TXT Files': ['csv', 'txt'],
'All Files': ['*']
@@ -213,7 +213,7 @@ export class FileConfigPage extends ImportPage {
return {
component: this.fileTextBox,
title: localize('flatFileImport.fileTextboxTitle', 'Location of the file to be imported'),
title: localize('flatFileImport.fileTextboxTitle', "Location of the file to be imported"),
actions: [this.fileButton]
};
}
@@ -242,7 +242,7 @@ export class FileConfigPage extends ImportPage {
return {
component: this.tableNameTextBox,
title: localize('flatFileImport.tableTextboxTitle', 'New table name'),
title: localize('flatFileImport.tableTextboxTitle', "New table name"),
};
}
@@ -260,7 +260,7 @@ export class FileConfigPage extends ImportPage {
return {
component: this.schemaLoader,
title: localize('flatFileImport.schemaTextboxTitle', 'Table schema'),
title: localize('flatFileImport.schemaTextboxTitle', "Table schema"),
};
}

View File

@@ -107,20 +107,20 @@ export class ModifyColumnsPage extends ImportPage {
async onPageEnter(): Promise<boolean> {
this.loading.loading = true;
await this.populateTable();
this.instance.changeNextButtonLabel(localize('flatFileImport.importData', 'Import Data'));
this.instance.changeNextButtonLabel(localize('flatFileImport.importData', "Import Data"));
this.loading.loading = false;
return true;
}
async onPageLeave(): Promise<boolean> {
this.instance.changeNextButtonLabel(localize('flatFileImport.next', 'Next'));
this.instance.changeNextButtonLabel(localize('flatFileImport.next', "Next"));
return undefined;
}
async cleanup(): Promise<boolean> {
delete this.model.proseColumns;
this.instance.changeNextButtonLabel(localize('flatFileImport.next', 'Next'));
this.instance.changeNextButtonLabel(localize('flatFileImport.next', "Next"));
return true;
}
@@ -141,23 +141,23 @@ export class ModifyColumnsPage extends ImportPage {
this.table.updateProperties({
height: 400,
columns: [{
displayName: localize('flatFileImport.columnName', 'Column Name'),
displayName: localize('flatFileImport.columnName', "Column Name"),
valueType: azdata.DeclarativeDataType.string,
width: '150px',
isReadOnly: false
}, {
displayName: localize('flatFileImport.dataType', 'Data Type'),
displayName: localize('flatFileImport.dataType', "Data Type"),
valueType: azdata.DeclarativeDataType.editableCategory,
width: '150px',
isReadOnly: false,
categoryValues: this.categoryValues
}, {
displayName: localize('flatFileImport.primaryKey', 'Primary Key'),
displayName: localize('flatFileImport.primaryKey', "Primary Key"),
valueType: azdata.DeclarativeDataType.boolean,
width: '100px',
isReadOnly: false
}, {
displayName: localize('flatFileImport.allowNulls', 'Allow Nulls'),
displayName: localize('flatFileImport.allowNulls', "Allow Nulls"),
valueType: azdata.DeclarativeDataType.boolean,
isReadOnly: false,
width: '100px'

View File

@@ -17,8 +17,8 @@ const localize = nls.loadMessageBundle();
export class ProsePreviewPage extends ImportPage {
private readonly successTitle: string = localize('flatFileImport.prosePreviewMessage', 'This operation analyzed the input file structure to generate the preview below for up to the first 50 rows.');
private readonly failureTitle: string = localize('flatFileImport.prosePreviewMessageFail', 'This operation was unsuccessful. Please try a different input file.');
private readonly successTitle: string = localize('flatFileImport.prosePreviewMessage', "This operation analyzed the input file structure to generate the preview below for up to the first 50 rows.");
private readonly failureTitle: string = localize('flatFileImport.prosePreviewMessageFail', "This operation was unsuccessful. Please try a different input file.");
private table: azdata.TableComponent;
private loading: azdata.LoadingComponent;
@@ -38,7 +38,7 @@ export class ProsePreviewPage extends ImportPage {
forceFitColumns: azdata.ColumnSizingMode.AutoFit
}).component();
this.refresh = this.view.modelBuilder.button().withProperties({
label: localize('flatFileImport.refresh', 'Refresh'),
label: localize('flatFileImport.refresh', "Refresh"),
isFile: false
}).component();

View File

@@ -33,11 +33,11 @@ export class SummaryPage extends ImportPage {
[
{
component: this.table,
title: localize('flatFileImport.importInformation', 'Import information')
title: localize('flatFileImport.importInformation', "Import information")
},
{
component: this.loading,
title: localize('flatFileImport.importStatus', 'Import status')
title: localize('flatFileImport.importStatus', "Import status")
}
]
).component();
@@ -70,11 +70,11 @@ export class SummaryPage extends ImportPage {
private populateTable() {
this.table.updateProperties({
data: [
[localize('flatFileImport.serverName', 'Server name'), this.model.server.providerName],
[localize('flatFileImport.databaseName', 'Database name'), this.model.database],
[localize('flatFileImport.tableName', 'Table name'), this.model.table],
[localize('flatFileImport.tableSchema', 'Table schema'), this.model.schema],
[localize('flatFileImport.fileImport', 'File to be imported'), this.model.filePath]],
[localize('flatFileImport.serverName', "Server name"), this.model.server.providerName],
[localize('flatFileImport.databaseName', "Database name"), this.model.database],
[localize('flatFileImport.tableName', "Table name"), this.model.table],
[localize('flatFileImport.tableSchema', "Table schema"), this.model.schema],
[localize('flatFileImport.fileImport', "File to be imported"), this.model.filePath]],
columns: ['Object type', 'Name'],
width: 600,
height: 200
@@ -118,7 +118,7 @@ export class SummaryPage extends ImportPage {
// TODO: When sql statements are in, implement this.
//let rows = await this.getCountRowsInserted();
//if (rows < 0) {
updateText = localize('flatFileImport.success.norows', '✔ You have successfully inserted the data into a table.');
updateText = localize('flatFileImport.success.norows', "✔ You have successfully inserted the data into a table.");
//} else {
//updateText = localize('flatFileImport.success.rows', '✔ You have successfully inserted {0} rows.', rows);
//}