mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add back common extension linting rules (#23271)
* Add back common extension linting rules * Fix lint issues
This commit is contained in:
8
extensions/.eslintrc.json
Normal file
8
extensions/.eslintrc.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-cond-assign": 2,
|
||||
"jsdoc/check-param-names": "error",
|
||||
"@typescript-eslint/explicit-function-return-type": ["error"],
|
||||
"@typescript-eslint/await-thenable": ["error"]
|
||||
}
|
||||
}
|
||||
6
extensions/css-language-features/.eslintrc.json
Normal file
6
extensions/css-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
9
extensions/datavirtualization/.eslintrc.json
Normal file
9
extensions/datavirtualization/.eslintrc.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"parserOptions": {
|
||||
"project": "./extensions/datavirtualization/tsconfig.json",
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export class FileConfigPage extends ImportPage {
|
||||
private async populateDatabaseDropdown(): Promise<boolean> {
|
||||
let idx = -1;
|
||||
let count = -1;
|
||||
let dbNames = await this.model.allDatabases.map(dbName => {
|
||||
let dbNames = this.model.allDatabases.map(dbName => {
|
||||
count++;
|
||||
if (this.model.database && dbName === this.model.database) {
|
||||
idx = count;
|
||||
|
||||
6
extensions/git-base/.eslintrc.json
Normal file
6
extensions/git-base/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/html-language-features/.eslintrc.json
Normal file
6
extensions/html-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/ipynb/.eslintrc.json
Normal file
6
extensions/ipynb/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,6 @@ export class SqlProjectsService extends BaseService implements mssql.ISqlProject
|
||||
* @param projectUri Absolute path of the project, including .sqlproj
|
||||
* @param name Name of the SQLCMD variable
|
||||
* @param defaultValue Default value of the SQLCMD variable
|
||||
* @param value Value of the SQLCMD variable, with or without the $()
|
||||
*/
|
||||
public async addSqlCmdVariable(projectUri: string, name: string, defaultValue: string): Promise<azdata.ResultStatus> {
|
||||
const params: contracts.AddSqlCmdVariableParams = { projectUri: projectUri, name: name, defaultValue: defaultValue };
|
||||
@@ -310,7 +309,6 @@ export class SqlProjectsService extends BaseService implements mssql.ISqlProject
|
||||
* @param projectUri Absolute path of the project, including .sqlproj
|
||||
* @param name Name of the SQLCMD variable
|
||||
* @param defaultValue Default value of the SQLCMD variable
|
||||
* @param value Value of the SQLCMD variable, with or without the $()
|
||||
*/
|
||||
public async updateSqlCmdVariable(projectUri: string, name: string, defaultValue: string): Promise<azdata.ResultStatus> {
|
||||
const params: contracts.AddSqlCmdVariableParams = { projectUri: projectUri, name: name, defaultValue: defaultValue };
|
||||
|
||||
6
extensions/notebook-renderers/.eslintrc.json
Normal file
6
extensions/notebook-renderers/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1038,6 @@ export class Project implements ISqlProject {
|
||||
/**
|
||||
* Moves a file to a different location
|
||||
* @param node Node being moved
|
||||
* @param projectFilePath Full file path to .sqlproj
|
||||
* @param destinationRelativePath path of the destination, relative to .sqlproj
|
||||
*/
|
||||
public async move(node: BaseProjectTreeItem, destinationRelativePath: string): Promise<azdataType.ResultStatus> {
|
||||
|
||||
@@ -23,7 +23,6 @@ export class DatabaseReferencesTreeItem extends BaseProjectTreeItem {
|
||||
* @param projectNodeName Name of the project node. Used for creating the relative path of the Database References node to the project
|
||||
* @param sqlprojUri Full URI to the .sqlproj
|
||||
* @param databaseReferences Array of database references in the project
|
||||
* @param project
|
||||
*/
|
||||
constructor(projectNodeName: string, sqlprojUri: vscode.Uri, databaseReferences: IDatabaseReferenceProjectEntry[]) {
|
||||
super(vscode.Uri.file(path.join(projectNodeName, constants.databaseReferencesNodeName)), sqlprojUri);
|
||||
|
||||
@@ -21,7 +21,6 @@ export class SqlCmdVariablesTreeItem extends BaseProjectTreeItem {
|
||||
* @param projectNodeName Name of the project node. Used for creating the relative path of the SQLCMD Variables node to the project
|
||||
* @param sqlprojUri Full URI to the .sqlproj
|
||||
* @param sqlCmdVariables Collection of SQLCMD variables in the project
|
||||
* @param project
|
||||
*/
|
||||
constructor(projectNodeName: string, sqlprojUri: vscode.Uri, sqlCmdVariables: Map<string, string>) {
|
||||
super(vscode.Uri.file(path.join(projectNodeName, constants.sqlcmdVariablesNodeName)), sqlprojUri);
|
||||
|
||||
@@ -100,8 +100,10 @@ export async function createTestFile(test: Mocha.Runnable | undefined, contents:
|
||||
* -file5.sql
|
||||
* - file2.txt
|
||||
*
|
||||
* @param test
|
||||
* @param createList Boolean specifying to create a list of the files and folders been created
|
||||
* @param list List of files and folders that are been created
|
||||
* @param testFolderPath
|
||||
*/
|
||||
export async function createDummyFileStructure(test: Mocha.Runnable | undefined, createList?: boolean, list?: Uri[], testFolderPath?: string): Promise<string> {
|
||||
testFolderPath = testFolderPath ?? await generateTestFolderPath(test);
|
||||
@@ -159,8 +161,10 @@ export async function createDummyFileStructure(test: Mocha.Runnable | undefined,
|
||||
* - Script.PreDeployment2.sql
|
||||
* - Script.PostDeployment1.sql
|
||||
*
|
||||
* @param test
|
||||
* @param createList Boolean specifying to create a list of the files and folders been created
|
||||
* @param list List of files and folders that are been created
|
||||
* @param testFolderPath
|
||||
*/
|
||||
export async function createDummyFileStructureWithPrePostDeployScripts(test: Mocha.Runnable | undefined, createList?: boolean, list?: Uri[], testFolderPath?: string): Promise<string> {
|
||||
testFolderPath = await createDummyFileStructure(test, createList, list, testFolderPath);
|
||||
|
||||
@@ -124,7 +124,7 @@ export class MigrationDetailsTab extends MigrationDetailsTabBase<MigrationDetail
|
||||
await this.statusBar.clearError();
|
||||
|
||||
if (initialize) {
|
||||
await this._clearControlsValue();
|
||||
this._clearControlsValue();
|
||||
await utils.updateControlDisplay(this._fileTable, false);
|
||||
await this._fileTable.updateProperty('columns', this._getTableColumns(this.model?.migration));
|
||||
await this._showControls(this.model?.migration);
|
||||
|
||||
@@ -247,7 +247,7 @@ export abstract class MigrationDetailsTabBase<T> extends TabBase<T> {
|
||||
await this.statusBar.clearError();
|
||||
if (canRetryMigration(this.model.migration)) {
|
||||
const errorMessage = getMigrationErrors(this.model.migration);
|
||||
await openRetryMigrationDialog(
|
||||
openRetryMigrationDialog(
|
||||
errorMessage,
|
||||
async () => {
|
||||
try {
|
||||
|
||||
@@ -89,7 +89,7 @@ export class MigrationDetailsTableTab extends MigrationDetailsTabBase<MigrationD
|
||||
this.refreshLoader.loading = true;
|
||||
await this.statusBar.clearError();
|
||||
if (initialize) {
|
||||
await this._clearControlsValue();
|
||||
this._clearControlsValue();
|
||||
}
|
||||
await this.model.fetchStatus();
|
||||
await this._loadData();
|
||||
|
||||
@@ -361,7 +361,7 @@ export class DashboardWidget {
|
||||
const migration = await this._getMigrationById(args.migrationId, args.migrationOperationId);
|
||||
if (service && migration && canRetryMigration(migration)) {
|
||||
const errorMessage = getMigrationErrors(migration);
|
||||
await openRetryMigrationDialog(
|
||||
openRetryMigrationDialog(
|
||||
errorMessage,
|
||||
async () => {
|
||||
try {
|
||||
|
||||
@@ -1468,7 +1468,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
|
||||
private async getSubscriptionValues(): Promise<void> {
|
||||
this._networkShareContainerSubscription.value = this.migrationStateModel._targetSubscription.name;
|
||||
this._networkShareContainerLocation.value = await this.migrationStateModel._location.displayName;
|
||||
this._networkShareContainerLocation.value = this.migrationStateModel._location.displayName;
|
||||
|
||||
this._blobContainerSubscription.value = this.migrationStateModel._targetSubscription.name;
|
||||
this._blobContainerLocation.value = this.migrationStateModel._location.displayName;
|
||||
|
||||
6
extensions/typescript-language-features/.eslintrc.json
Normal file
6
extensions/typescript-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/vscode-api-tests/.eslintrc.json
Normal file
6
extensions/vscode-api-tests/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"],
|
||||
"@typescript-eslint/await-thenable": ["off"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user