diff --git a/.eslintignore b/.eslintignore index 0b695f8676..dd9d0608c6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,17 +8,16 @@ **/semver/** **/test/**/*.js **/node_modules/** -**/vscode-api-tests/testWorkspace/** -**/vscode-api-tests/testWorkspace2/** -**/extensions/**/out/** -**/extensions/**/build/** -**/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts -**/big-data-cluster/src/bigDataCluster/controller/clusterApiGenerated2.ts -**/extensions/markdown-language-features/media/** -**/extensions/markdown-language-features/notebook-out/** -**/extensions/typescript-basics/test/colorize-fixtures/** -**/extensions/**/dist/** -**/extensions/typescript-language-features/test-workspace/** +/extensions/**/out/** +/extensions/**/build/** +/extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts +/extensions/big-data-cluster/src/bigDataCluster/controller/clusterApiGenerated2.ts +/extensions/markdown-language-features/media/** +/extensions/markdown-language-features/notebook-out/** +/extensions/typescript-basics/test/colorize-fixtures/** +/extensions/**/dist/** +/extensions/types +/extensions/typescript-language-features/test-workspace/** # These files are not linted by `yarn eslint`, so we exclude them from being linted in the editor. # This ensures that if we add new rules and they pass CI, the are also no errors in the editor. diff --git a/extensions/.eslintrc.json b/extensions/.eslintrc.json index c50b683b79..c3593ec33a 100644 --- a/extensions/.eslintrc.json +++ b/extensions/.eslintrc.json @@ -2,6 +2,7 @@ "rules": { "no-cond-assign": 2, "jsdoc/check-param-names": "error", - "@typescript-eslint/explicit-function-return-type": ["error"] + "@typescript-eslint/explicit-function-return-type": ["error"], + "@typescript-eslint/await-thenable": ["error"] } } diff --git a/extensions/agent/.eslintrc.json b/extensions/agent/.eslintrc.json index a75d4af2a5..5a2aa1163b 100644 --- a/extensions/agent/.eslintrc.json +++ b/extensions/agent/.eslintrc.json @@ -1,4 +1,8 @@ + { + "parserOptions": { + "project": "./extensions/agent/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/agent/src/dialogs/agentDialog.ts b/extensions/agent/src/dialogs/agentDialog.ts index 2539d7cb86..19ce30f8da 100644 --- a/extensions/agent/src/dialogs/agentDialog.ts +++ b/extensions/agent/src/dialogs/agentDialog.ts @@ -40,7 +40,7 @@ export abstract class AgentDialog { let event = dialogName ? dialogName : null; this.dialog = azdata.window.createModelViewDialog(this.title, event); - await this.model.initialize(); + this.model.initialize(); await this.initializeDialog(this.dialog); diff --git a/extensions/arc/.eslintrc.json b/extensions/arc/.eslintrc.json index a75d4af2a5..44455325ef 100644 --- a/extensions/arc/.eslintrc.json +++ b/extensions/arc/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/arc/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/azcli/.eslintrc.json b/extensions/azcli/.eslintrc.json index a75d4af2a5..d0116fdf53 100644 --- a/extensions/azcli/.eslintrc.json +++ b/extensions/azcli/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/azcli/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/azurecore/src/test/account-provider/utils/fileDatabase.test.ts b/extensions/azurecore/src/test/account-provider/utils/fileDatabase.test.ts index 82f54d5786..b7d4d3cba3 100644 --- a/extensions/azurecore/src/test/account-provider/utils/fileDatabase.test.ts +++ b/extensions/azurecore/src/test/account-provider/utils/fileDatabase.test.ts @@ -72,7 +72,7 @@ describe('AccountProvider.FileDatabase', function (): void { await fileDatabase.deletePrefix('k'); - x = await fileDatabase.get(k1); + x = fileDatabase.get(k1); should(x).be.undefined(); }); diff --git a/extensions/azurehybridtoolkit/.eslintrc.json b/extensions/azurehybridtoolkit/.eslintrc.json index a75d4af2a5..1814eab8e3 100644 --- a/extensions/azurehybridtoolkit/.eslintrc.json +++ b/extensions/azurehybridtoolkit/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/azurehybridtoolkit/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/azuremonitor/.eslintrc.json b/extensions/azuremonitor/.eslintrc.json index a75d4af2a5..24430c73d1 100644 --- a/extensions/azuremonitor/.eslintrc.json +++ b/extensions/azuremonitor/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/azuremonitor/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/azuremonitor/src/prompts/adapter.ts b/extensions/azuremonitor/src/prompts/adapter.ts index 83a8816c3a..41cb52a84f 100644 --- a/extensions/azuremonitor/src/prompts/adapter.ts +++ b/extensions/azuremonitor/src/prompts/adapter.ts @@ -40,7 +40,7 @@ export default class CodeAdapter implements IPrompter { let answers: Answers = {}; questions.forEach(async (question: IQuestion) => { this.fixQuestion(question); - const prompt = await PromptFactory.createPrompt(question, ignoreFocusOut); + const prompt = PromptFactory.createPrompt(question, ignoreFocusOut); if (!question.shouldPrompt || question.shouldPrompt(answers) === true) { const result = await prompt.render(); answers[question.name] = result; diff --git a/extensions/big-data-cluster/.eslintrc.json b/extensions/big-data-cluster/.eslintrc.json index a75d4af2a5..77cd8b61f8 100644 --- a/extensions/big-data-cluster/.eslintrc.json +++ b/extensions/big-data-cluster/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/big-data-cluster/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/cms/.eslintrc.json b/extensions/cms/.eslintrc.json index a75d4af2a5..44c6eb979a 100644 --- a/extensions/cms/.eslintrc.json +++ b/extensions/cms/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/cms/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/configuration-editing/.eslintrc.json b/extensions/configuration-editing/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/configuration-editing/.eslintrc.json +++ b/extensions/configuration-editing/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/dacpac/.eslintrc.json b/extensions/dacpac/.eslintrc.json index a75d4af2a5..4e8721e6da 100644 --- a/extensions/dacpac/.eslintrc.json +++ b/extensions/dacpac/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/dacpac/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/dacpac/src/wizard/pages/deployConfigPage.ts b/extensions/dacpac/src/wizard/pages/deployConfigPage.ts index fa0c1b0530..aa5facbbab 100644 --- a/extensions/dacpac/src/wizard/pages/deployConfigPage.ts +++ b/extensions/dacpac/src/wizard/pages/deployConfigPage.ts @@ -31,7 +31,7 @@ export class DeployConfigPage extends DacFxConfigPage { this.databaseComponent = await this.createDatabaseTextBox(loc.databaseName); this.databaseDropdownComponent = await this.createDeployDatabaseDropdown(); this.databaseDropdownComponent.title = loc.databaseName; - let radioButtons = await this.createRadiobuttons(); + let radioButtons = this.createRadiobuttons(); this.formBuilder = this.view.modelBuilder.formContainer() .withFormItems( diff --git a/extensions/data-workspace/src/dialogs/projectDashboard.ts b/extensions/data-workspace/src/dialogs/projectDashboard.ts index c0f0e48d5f..40105da711 100644 --- a/extensions/data-workspace/src/dialogs/projectDashboard.ts +++ b/extensions/data-workspace/src/dialogs/projectDashboard.ts @@ -116,8 +116,8 @@ export class ProjectDashboard { height: '20px' }).component(); - button.onDidClick(async () => { - await projectAction.run(this._treeItem); + button.onDidClick(() => { + projectAction.run(this._treeItem); }); return button; diff --git a/extensions/git/.eslintrc.json b/extensions/git/.eslintrc.json index 8441dfbabe..893b221f9c 100644 --- a/extensions/git/.eslintrc.json +++ b/extensions/git/.eslintrc.json @@ -1,6 +1,7 @@ { "rules": { "no-cond-assign": 0, - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/github-authentication/.eslintrc.json b/extensions/github-authentication/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/github-authentication/.eslintrc.json +++ b/extensions/github-authentication/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/github/.eslintrc.json b/extensions/github/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/github/.eslintrc.json +++ b/extensions/github/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/image-preview/.eslintrc.json b/extensions/image-preview/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/image-preview/.eslintrc.json +++ b/extensions/image-preview/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/import/.eslintrc.json b/extensions/import/.eslintrc.json index a75d4af2a5..7c75ec099f 100644 --- a/extensions/import/.eslintrc.json +++ b/extensions/import/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/import/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/import/src/test/utils.test.ts b/extensions/import/src/test/utils.test.ts index 9c6d3389c8..820136d277 100644 --- a/extensions/import/src/test/utils.test.ts +++ b/extensions/import/src/test/utils.test.ts @@ -37,12 +37,12 @@ export class ImportTestUtils { } public static async getExtensionPath(): Promise { - return await vscode.extensions.getExtension('Microsoft.import').extensionPath; + return vscode.extensions.getExtension('Microsoft.import').extensionPath; } public static async getTestExtensionContext(): Promise { let testContext = new TestExtensionContext(); - testContext.extensionPath = await vscode.extensions.getExtension('Microsoft.import').extensionPath; + testContext.extensionPath = vscode.extensions.getExtension('Microsoft.import').extensionPath; return testContext; } } diff --git a/extensions/import/src/wizard/pages/modifyColumnsPage.ts b/extensions/import/src/wizard/pages/modifyColumnsPage.ts index 095f07ec0e..c6a49f3dd8 100644 --- a/extensions/import/src/wizard/pages/modifyColumnsPage.ts +++ b/extensions/import/src/wizard/pages/modifyColumnsPage.ts @@ -137,7 +137,7 @@ export class ModifyColumnsPage extends ImportPage { } override async onPageLeave(): Promise { - await this.emptyTable(); + this.emptyTable(); this.instance.changeNextButtonLabel(constants.nextText); this.instance.registerNavigationValidator((info) => { return true; diff --git a/extensions/integration-tests/.eslintrc.json b/extensions/integration-tests/.eslintrc.json index a75d4af2a5..b995860438 100644 --- a/extensions/integration-tests/.eslintrc.json +++ b/extensions/integration-tests/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/integration-tests/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/json-language-features/.eslintrc.json b/extensions/json-language-features/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/json-language-features/.eslintrc.json +++ b/extensions/json-language-features/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/kusto/.eslintrc.json b/extensions/kusto/.eslintrc.json index a75d4af2a5..bcaf4b5e23 100644 --- a/extensions/kusto/.eslintrc.json +++ b/extensions/kusto/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/kusto/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/kusto/src/prompts/adapter.ts b/extensions/kusto/src/prompts/adapter.ts index 83a8816c3a..41cb52a84f 100644 --- a/extensions/kusto/src/prompts/adapter.ts +++ b/extensions/kusto/src/prompts/adapter.ts @@ -40,7 +40,7 @@ export default class CodeAdapter implements IPrompter { let answers: Answers = {}; questions.forEach(async (question: IQuestion) => { this.fixQuestion(question); - const prompt = await PromptFactory.createPrompt(question, ignoreFocusOut); + const prompt = PromptFactory.createPrompt(question, ignoreFocusOut); if (!question.shouldPrompt || question.shouldPrompt(answers) === true) { const result = await prompt.render(); answers[question.name] = result; diff --git a/extensions/liveshare/.eslintrc.json b/extensions/liveshare/.eslintrc.json index a75d4af2a5..65afbde805 100644 --- a/extensions/liveshare/.eslintrc.json +++ b/extensions/liveshare/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/liveshare/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/machine-learning/src/.eslintrc.json b/extensions/machine-learning/src/.eslintrc.json index cc1e40b5db..714eb58da7 100644 --- a/extensions/machine-learning/src/.eslintrc.json +++ b/extensions/machine-learning/src/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/machine-learning/tsconfig.json" + }, "rules": { "@typescript-eslint/explicit-function-return-type": ["off"] } diff --git a/extensions/machine-learning/src/modelManagement/deployedModelService.ts b/extensions/machine-learning/src/modelManagement/deployedModelService.ts index 9b0791c850..3fab1c8554 100644 --- a/extensions/machine-learning/src/modelManagement/deployedModelService.ts +++ b/extensions/machine-learning/src/modelManagement/deployedModelService.ts @@ -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'; diff --git a/extensions/machine-learning/src/views/externalLanguages/currentLanguagesTab.ts b/extensions/machine-learning/src/views/externalLanguages/currentLanguagesTab.ts index e8c5e00ed7..d825ee4848 100644 --- a/extensions/machine-learning/src/views/externalLanguages/currentLanguagesTab.ts +++ b/extensions/machine-learning/src/views/externalLanguages/currentLanguagesTab.ts @@ -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(); diff --git a/extensions/machine-learning/src/views/models/azureResourceFilterComponent.ts b/extensions/machine-learning/src/views/models/azureResourceFilterComponent.ts index 9396bb77fb..d3d6439c78 100644 --- a/extensions/machine-learning/src/views/models/azureResourceFilterComponent.ts +++ b/extensions/machine-learning/src/views/models/azureResourceFilterComponent.ts @@ -66,7 +66,7 @@ export class AzureResourceFilterComponent extends ModelViewBase implements IData }); this._workspaces.onValueChanged(async (newValue) => { if (newValue.selected !== (this._workspaces.value)?.name) { - await this.onWorkspaceSelectedChanged(); + this.onWorkspaceSelectedChanged(); } }); diff --git a/extensions/machine-learning/src/views/models/manageModels/importModelWizard.ts b/extensions/machine-learning/src/views/models/manageModels/importModelWizard.ts index bcd7b6afb6..6dcef1156e 100644 --- a/extensions/machine-learning/src/views/models/manageModels/importModelWizard.ts +++ b/extensions/machine-learning/src/views/models/manageModels/importModelWizard.ts @@ -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; } } diff --git a/extensions/machine-learning/src/views/models/modelViewBase.ts b/extensions/machine-learning/src/views/models/modelViewBase.ts index dc0f2f6f21..28446021d8 100644 --- a/extensions/machine-learning/src/views/models/modelViewBase.ts +++ b/extensions/machine-learning/src/views/models/modelViewBase.ts @@ -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 { - await this.sendRequest(StoreImportTableEventName, this.importTable); + this.sendRequest(StoreImportTableEventName, this.importTable); } /** diff --git a/extensions/markdown-language-features/.eslintrc.json b/extensions/markdown-language-features/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/markdown-language-features/.eslintrc.json +++ b/extensions/markdown-language-features/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/markdown-math/.eslintrc.json b/extensions/markdown-math/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/markdown-math/.eslintrc.json +++ b/extensions/markdown-math/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/merge-conflict/.eslintrc.json b/extensions/merge-conflict/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/merge-conflict/.eslintrc.json +++ b/extensions/merge-conflict/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/microsoft-authentication/.eslintrc.json b/extensions/microsoft-authentication/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/microsoft-authentication/.eslintrc.json +++ b/extensions/microsoft-authentication/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/notebook/src/test/common/utils.test.ts b/extensions/notebook/src/test/common/utils.test.ts index 65f2a3d2c3..1c7e938773 100644 --- a/extensions/notebook/src/test/common/utils.test.ts +++ b/extensions/notebook/src/test/common/utils.test.ts @@ -159,95 +159,95 @@ describe('Utils Tests', function () { it('Constraints have no version specifier', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['3.6.*', '3.*']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); versionConstraints = ['3.5.*', '3.5']; - result = await utils.isPackageSupported(pythonVersion, versionConstraints); + result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.false(); }); it('Package is valid for version constraints', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['>=3.5,!=3.2,!=3.4.*']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Version constraints string has lots of spaces', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['>= 3.5, != 3.2, != 3.4.*']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Strictly greater or less than comparisons', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['> 3.5, > 3.4.*', '< 3.8']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Strict equality', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['== 3.6', '== 3.6.*']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Package is valid for first set of constraints, but not the second', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['>=3.5, !=3.2, !=3.4.*', '!=3.6, >=3.5']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Package is valid for second set of constraints, but not the first', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['!=3.6, >=3.5', '>=3.5, !=3.2, !=3.4.*']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Package is not valid for constraints', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['>=3.4, !=3.6, >=3.5']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.false(); }); it('Package is not valid for several sets of constraints', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['>=3.7', '!=3.6, >=3.5', '>=3.8']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.false(); }); it('Constraints are all empty strings', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints = ['', '', '']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Constraints are all undefined', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints: string[] = [undefined, undefined, undefined]; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Constraints are a bunch of commas', async function (): Promise { let pythonVersion = '3.6'; let versionConstraints: string[] = [',,,', ',,,,', ', , , , , , ,']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); it('Installed python version is an empty string', async function (): Promise { let pythonVersion = ''; let versionConstraints = ['>=3.7', '!=3.6, >=3.5', '>=3.8']; - let result = await utils.isPackageSupported(pythonVersion, versionConstraints); + let result = utils.isPackageSupported(pythonVersion, versionConstraints); should(result).be.true(); }); }); diff --git a/extensions/profiler/.eslintrc.json b/extensions/profiler/.eslintrc.json index a75d4af2a5..319d28bff2 100644 --- a/extensions/profiler/.eslintrc.json +++ b/extensions/profiler/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/profiler/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/python/.eslintrc.json b/extensions/python/.eslintrc.json new file mode 100644 index 0000000000..e0605cd1ae --- /dev/null +++ b/extensions/python/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/await-thenable": ["off"] + } +} diff --git a/extensions/resource-deployment/.eslintrc.json b/extensions/resource-deployment/.eslintrc.json index a75d4af2a5..2d4014f5de 100644 --- a/extensions/resource-deployment/.eslintrc.json +++ b/extensions/resource-deployment/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/resource-deployment/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/schema-compare/.eslintrc.json b/extensions/schema-compare/.eslintrc.json index a75d4af2a5..46c0f114b2 100644 --- a/extensions/schema-compare/.eslintrc.json +++ b/extensions/schema-compare/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/schema-compare/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts index 52179a5b62..8ecd3789b6 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts @@ -48,10 +48,10 @@ export class SchemaCompareOptionsDialog { this.initializeDialog(); this.dialog.okButton.label = loc.OkButtonText; - this.dialog.okButton.onClick(async () => await this.execute()); + this.dialog.okButton.onClick(() => this.execute()); this.dialog.cancelButton.label = loc.CancelButtonText; - this.dialog.cancelButton.onClick(async () => await this.cancel()); + this.dialog.cancelButton.onClick(() => this.cancel()); let resetButton = azdata.window.createButton(loc.ResetButtonText); resetButton.onClick(async () => await this.reset()); diff --git a/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts b/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts index b34c31221d..da5fbb1ec6 100644 --- a/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts +++ b/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts @@ -10,7 +10,7 @@ import { SchemaCompareOptionsDialog } from '../../dialogs/schemaCompareOptionsDi describe('Schema Compare Options Dialog', () => { it('Should open dialog successfully ', async function (): Promise { const optionsDialog = new SchemaCompareOptionsDialog(testUtils.getDeploymentOptions(), undefined); - await optionsDialog.openDialog(); + optionsDialog.openDialog(); should.notEqual(optionsDialog.dialog, undefined); }); }); diff --git a/extensions/schema-compare/src/utils.ts b/extensions/schema-compare/src/utils.ts index 20c8db87aa..a6c22ea797 100644 --- a/extensions/schema-compare/src/utils.ts +++ b/extensions/schema-compare/src/utils.ts @@ -109,7 +109,7 @@ export async function verifyConnectionAndGetOwnerUri(endpoint: mssql.SchemaCompa let ownerUri = undefined; if (endpoint.endpointType === mssql.SchemaCompareEndpointType.Database && endpoint.connectionDetails) { - let connectionProfile = await connectionInfoToConnectionProfile(endpoint.connectionDetails); + let connectionProfile = connectionInfoToConnectionProfile(endpoint.connectionDetails); let connection = await azdata.connection.connect(connectionProfile, false, false); if (connection) { diff --git a/extensions/search-result/.eslintrc.json b/extensions/search-result/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/search-result/.eslintrc.json +++ b/extensions/search-result/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/server-report/.eslintrc.json b/extensions/server-report/.eslintrc.json new file mode 100644 index 0000000000..5fd96d9a97 --- /dev/null +++ b/extensions/server-report/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "parserOptions": { + "project": "./extensions/server-report/tsconfig.json" + } +} diff --git a/extensions/simple-browser/.eslintrc.json b/extensions/simple-browser/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/simple-browser/.eslintrc.json +++ b/extensions/simple-browser/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/sql-assessment/.eslintrc.json b/extensions/sql-assessment/.eslintrc.json index a75d4af2a5..55dfd7a96c 100644 --- a/extensions/sql-assessment/.eslintrc.json +++ b/extensions/sql-assessment/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/sql-assessment/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/sql-assessment/src/engine.ts b/extensions/sql-assessment/src/engine.ts index 74e108499b..8f4d83ba17 100644 --- a/extensions/sql-assessment/src/engine.ts +++ b/extensions/sql-assessment/src/engine.ts @@ -65,7 +65,7 @@ export class AssessmentEngine { } else { if (asmtType === AssessmentType.AvailableRules) { TelemetryReporter.sendActionEvent(SqlAssessmentTelemetryView, SqlTelemetryActions.GetDatabaseAssessmentRules); - await onResult(await this.sqlAssessment.getAssessmentItems(this.connectionUri, azdata.sqlAssessment.SqlAssessmentTargetType.Database), asmtType, false); + onResult(await this.sqlAssessment.getAssessmentItems(this.connectionUri, azdata.sqlAssessment.SqlAssessmentTargetType.Database), asmtType, false); } else { TelemetryReporter.sendActionEvent(SqlAssessmentTelemetryView, SqlTelemetryActions.InvokeDatabaseAssessment); const result = await this.sqlAssessment.assessmentInvoke(this.connectionUri, azdata.sqlAssessment.SqlAssessmentTargetType.Database); @@ -76,7 +76,7 @@ export class AssessmentEngine { result: result }; - await onResult(result, asmtType, false); + onResult(result, asmtType, false); this.saveAssessment(this.databaseName, result); } @@ -147,7 +147,7 @@ export class AssessmentEngine { assessmentResult = await this.sqlAssessment.getAssessmentItems(this.connectionUri, azdata.sqlAssessment.SqlAssessmentTargetType.Server); } - await onResult(assessmentResult, asmtType, false); + onResult(assessmentResult, asmtType, false); let connectionProvider = azdata.dataprotocol.getProvider( this.connectionProfile.providerId, azdata.DataProviderType.ConnectionProvider); @@ -167,7 +167,7 @@ export class AssessmentEngine { this.lastInvokedResults.result.items.push(...assessmentResult?.items); this.saveAssessment(db, assessmentResult); } - await onResult(assessmentResult, asmtType, true); + onResult(assessmentResult, asmtType, true); } } } diff --git a/extensions/sql-database-projects/src/models/deploy/deployService.ts b/extensions/sql-database-projects/src/models/deploy/deployService.ts index d93d80c380..70eefe3f4c 100644 --- a/extensions/sql-database-projects/src/models/deploy/deployService.ts +++ b/extensions/sql-database-projects/src/models/deploy/deployService.ts @@ -84,7 +84,7 @@ export class DeployService { if (connectionString && profile.envVariableName) { content.Values[profile.envVariableName] = connectionString; - await fse.writeFileSync(profile.appSettingFile, JSON.stringify(content, undefined, 4)); + fse.writeFileSync(profile.appSettingFile, JSON.stringify(content, undefined, 4)); this.logToOutput(`app setting '${profile.appSettingFile}' has been updated. env variable name: ${profile.envVariableName} connection String: ${connectionString}`); } else { @@ -236,11 +236,11 @@ export class DeployService { } private async getConnectionString(connectionUri: string): Promise { - const getAzdataApi = await utils.getAzdataApi(); - if (getAzdataApi) { - const connection = await getAzdataApi.connection.getConnection(connectionUri); + const azdataApi = utils.getAzdataApi(); + if (azdataApi) { + const connection = await azdataApi.connection.getConnection(connectionUri); if (connection) { - return await getAzdataApi.connection.getConnectionString(connection.connectionId, true); + return await azdataApi.connection.getConnectionString(connection.connectionId, true); } } // TODO: vscode connections string @@ -251,9 +251,9 @@ export class DeployService { // Connects to a database private async connectToDatabase(profile: ISqlConnectionProperties, saveConnectionAndPassword: boolean, database: string): Promise { - const getAzdataApi = await utils.getAzdataApi(); - const vscodeMssqlApi = getAzdataApi ? undefined : await utils.getVscodeMssqlApi(); - if (getAzdataApi) { + const azdataApi = utils.getAzdataApi(); + const vscodeMssqlApi = azdataApi ? undefined : await utils.getVscodeMssqlApi(); + if (azdataApi) { const connectionProfile = { password: profile.password, serverName: `${profile.serverName},${profile.port}`, @@ -267,7 +267,7 @@ export class DeployService { options: [], authenticationType: 'SqlLogin' }; - return await getAzdataApi.connection.connect(connectionProfile, saveConnectionAndPassword, false); + return await azdataApi.connection.connect(connectionProfile, saveConnectionAndPassword, false); } else if (vscodeMssqlApi) { const connectionProfile = { password: profile.password, @@ -326,10 +326,10 @@ export class DeployService { // Validates the connection result. If using azdata API, verifies connection was successful and connection id is returns // If using vscode API, verifies the connection url is returns private async validateConnection(connection: ConnectionResult | string | undefined): Promise { - const getAzdataApi = await utils.getAzdataApi(); + const azdataApi = utils.getAzdataApi(); if (!connection) { return { validated: false, errorMessage: constants.connectionFailedError('No result returned') }; - } else if (getAzdataApi) { + } else if (azdataApi) { const connectionResult = connection; if (connectionResult) { const connected = connectionResult !== undefined && connectionResult.connected && connectionResult.connectionId !== undefined; @@ -344,13 +344,13 @@ export class DeployService { // Formats connection result to string to be able to add to log private async formatConnectionResult(connection: ConnectionResult | string | undefined): Promise { - const getAzdataApi = await utils.getAzdataApi(); - const connectionResult = connection !== undefined && getAzdataApi ? connection : undefined; + const azdataApi = utils.getAzdataApi(); + const connectionResult = connection !== undefined && azdataApi ? connection : undefined; return connectionResult?.connected ? connectionResult.connectionId! : connection; } public async getConnection(profile: ISqlConnectionProperties, saveConnectionAndPassword: boolean, database: string): Promise { - const getAzdataApi = await utils.getAzdataApi(); + const azdataApi = utils.getAzdataApi(); let connection = await utils.retry( constants.connectingToSqlServerMessage, async () => { @@ -363,9 +363,9 @@ export class DeployService { if (connection) { const connectionResult = connection; - if (getAzdataApi) { + if (azdataApi) { utils.throwIfNotConnected(connectionResult); - return getAzdataApi.connection.getUriForConnection(connectionResult.connectionId!); + return azdataApi.connection.getUriForConnection(connectionResult.connectionId!); } else { return connection; } @@ -375,11 +375,11 @@ export class DeployService { } private async executeTask(taskName: string, task: () => Promise): Promise { - const getAzdataApi = await utils.getAzdataApi(); - if (getAzdataApi) { + const azdataApi = utils.getAzdataApi(); + if (azdataApi) { return new Promise((resolve, reject) => { let msgTaskName = taskName; - getAzdataApi!.tasks.startBackgroundOperation({ + azdataApi!.tasks.startBackgroundOperation({ displayName: msgTaskName, description: msgTaskName, isCancelable: false, @@ -387,11 +387,11 @@ export class DeployService { try { let result: T = await task(); - op.updateStatus(getAzdataApi!.TaskStatus.Succeeded); + op.updateStatus(azdataApi!.TaskStatus.Succeeded); resolve(result); } catch (error) { let errorMsg = constants.taskFailedError(taskName, error ? error.message : ''); - op.updateStatus(getAzdataApi!.TaskStatus.Failed, errorMsg); + op.updateStatus(azdataApi!.TaskStatus.Failed, errorMsg); reject(errorMsg); } } diff --git a/extensions/sql-database-projects/src/models/project.ts b/extensions/sql-database-projects/src/models/project.ts index 2a1e9dc118..f1935ce51a 100644 --- a/extensions/sql-database-projects/src/models/project.ts +++ b/extensions/sql-database-projects/src/models/project.ts @@ -1264,7 +1264,7 @@ export class Project implements ISqlProject { */ private async undoExcludeFileFromProjFile(xmlTag: string, relativePath: string): Promise { const nodes = this.projFileXmlDoc!.documentElement.getElementsByTagName(xmlTag); - if (await this.removeNode(relativePath, nodes, true)) { + if (this.removeNode(relativePath, nodes, true)) { await this.serializeToProjFile(this.projFileXmlDoc!); } } diff --git a/extensions/sql-database-projects/src/test/netCoreTool.test.ts b/extensions/sql-database-projects/src/test/netCoreTool.test.ts index 4010d2143e..2fc458d856 100644 --- a/extensions/sql-database-projects/src/test/netCoreTool.test.ts +++ b/extensions/sql-database-projects/src/test/netCoreTool.test.ts @@ -69,11 +69,11 @@ describe('NetCoreTool: Net core tests', function (): void { should(text.toString().trim()).equal('test'); } finally { - await fs.exists(dummyFile, async (existBool) => { - if (existBool) { - await fs.promises.unlink(dummyFile); - } - }); + try { + await fs.promises.unlink(dummyFile); + } catch (err) { + console.warn(`Failed to clean up ${dummyFile}`); + } } }); }); diff --git a/extensions/sql-database-projects/src/test/project.test.ts b/extensions/sql-database-projects/src/test/project.test.ts index b702ab2bc5..ba6523badc 100644 --- a/extensions/sql-database-projects/src/test/project.test.ts +++ b/extensions/sql-database-projects/src/test/project.test.ts @@ -228,7 +228,7 @@ describe('Project: sqlproj content operations', function (): void { const project = await Project.openProject(projFilePath); await project.changeTargetPlatform('invalidPlatform'); - await testUtils.shouldThrowSpecificError(async () => await project.getSystemDacpacUri(constants.masterDacpac), constants.invalidDataSchemaProvider); + await testUtils.shouldThrowSpecificError(() => project.getSystemDacpacUri(constants.masterDacpac), constants.invalidDataSchemaProvider); }); it('Should add system database references correctly', async function (): Promise { diff --git a/extensions/sql-migration/.eslintrc.json b/extensions/sql-migration/.eslintrc.json index a75d4af2a5..52508f7ce3 100644 --- a/extensions/sql-migration/.eslintrc.json +++ b/extensions/sql-migration/.eslintrc.json @@ -1,4 +1,7 @@ { + "parserOptions": { + "project": "./extensions/sql-migration/tsconfig.json" + }, "rules": { // Disabled until the issues can be fixed "@typescript-eslint/explicit-function-return-type": ["off"] diff --git a/extensions/sql-migration/src/api/azure.ts b/extensions/sql-migration/src/api/azure.ts index 4edf1a13a1..27d9e6fa46 100644 --- a/extensions/sql-migration/src/api/azure.ts +++ b/extensions/sql-migration/src/api/azure.ts @@ -364,7 +364,7 @@ export async function stopMigration(account: azdata.Account, subscription: Subsc export async function getLocationDisplayName(location: string): Promise { const api = await getAzureCoreAPI(); - return await api.getRegionDisplayName(location); + return api.getRegionDisplayName(location); } type SortableAzureResources = AzureProduct | azurecore.azureResource.FileShare | azurecore.azureResource.BlobContainer | azurecore.azureResource.Blob | azurecore.azureResource.AzureResourceSubscription | SqlMigrationService; diff --git a/extensions/sql-migration/src/dialog/assessmentResults/savedAssessmentDialog.ts b/extensions/sql-migration/src/dialog/assessmentResults/savedAssessmentDialog.ts index 5ac98026c9..10de5103ed 100644 --- a/extensions/sql-migration/src/dialog/assessmentResults/savedAssessmentDialog.ts +++ b/extensions/sql-migration/src/dialog/assessmentResults/savedAssessmentDialog.ts @@ -56,7 +56,7 @@ export class SavedAssessmentDialog { dialog.registerCloseValidator(async () => { if (this.stateModel.resumeAssessment) { - if (await !this.stateModel.loadSavedInfo()) { + if (!this.stateModel.loadSavedInfo()) { void vscode.window.showInformationMessage(constants.OPEN_SAVED_INFO_ERROR); return false; } diff --git a/extensions/sql-migration/src/dialog/createResourceGroup/createResourceGroupDialog.ts b/extensions/sql-migration/src/dialog/createResourceGroup/createResourceGroupDialog.ts index 6d419d180e..4144293466 100644 --- a/extensions/sql-migration/src/dialog/createResourceGroup/createResourceGroupDialog.ts +++ b/extensions/sql-migration/src/dialog/createResourceGroup/createResourceGroupDialog.ts @@ -37,7 +37,7 @@ export class CreateResourceGroupDialog { async initialize(): Promise { let tab = azdata.window.createTab('sql.migration.CreateResourceGroupDialog'); - await tab.registerContent(async (view: azdata.ModelView) => { + tab.registerContent(async (view: azdata.ModelView) => { this._view = view; const resourceGroupDescription = view.modelBuilder.text().withProps({ diff --git a/extensions/sql-migration/src/dialog/selectMigrationService/selectMigrationServiceDialog.ts b/extensions/sql-migration/src/dialog/selectMigrationService/selectMigrationServiceDialog.ts index c9e842d297..2273bf5490 100644 --- a/extensions/sql-migration/src/dialog/selectMigrationService/selectMigrationServiceDialog.ts +++ b/extensions/sql-migration/src/dialog/selectMigrationService/selectMigrationServiceDialog.ts @@ -67,7 +67,7 @@ export class SelectMigrationServiceDialog { async initialize(): Promise { this._serviceContext = await MigrationLocalStorage.getMigrationServiceContext(); - await this._dialog.registerContent(async (view: azdata.ModelView) => { + this._dialog.registerContent(async (view: azdata.ModelView) => { this._disposables.push( view.onClosed(e => { this._disposables.forEach( diff --git a/extensions/sql-migration/src/dialog/targetDatabaseSummary/targetDatabaseSummaryDialog.ts b/extensions/sql-migration/src/dialog/targetDatabaseSummary/targetDatabaseSummaryDialog.ts index dca1fce252..0b2ae413a8 100644 --- a/extensions/sql-migration/src/dialog/targetDatabaseSummary/targetDatabaseSummaryDialog.ts +++ b/extensions/sql-migration/src/dialog/targetDatabaseSummary/targetDatabaseSummaryDialog.ts @@ -31,7 +31,7 @@ export class TargetDatabaseSummaryDialog { async initialize(): Promise { let tab = azdata.window.createTab('sql.migration.CreateResourceGroupDialog'); - await tab.registerContent(async (view: azdata.ModelView) => { + tab.registerContent(async (view: azdata.ModelView) => { this._view = view; const databaseCount = this._view.modelBuilder.text().withProps({ diff --git a/extensions/sql-migration/src/wizard/skuRecommendationPage.ts b/extensions/sql-migration/src/wizard/skuRecommendationPage.ts index 4dbfb50b55..30158842a7 100644 --- a/extensions/sql-migration/src/wizard/skuRecommendationPage.ts +++ b/extensions/sql-migration/src/wizard/skuRecommendationPage.ts @@ -174,7 +174,7 @@ export class SKURecommendationPage extends MigrationWizardPage { } }).component(); this._chooseTargetComponent = await this.createChooseTargetComponent(view); - const _azureRecommendationsContainer = await this.createAzureRecommendationContainer(view); + const _azureRecommendationsContainer = this.createAzureRecommendationContainer(view); this.assessmentGroupContainer = await this.createViewAssessmentsContainer(); this._formContainer = view.modelBuilder.formContainer().withFormItems( [ diff --git a/extensions/vscode-test-resolver/.eslintrc.json b/extensions/vscode-test-resolver/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/vscode-test-resolver/.eslintrc.json +++ b/extensions/vscode-test-resolver/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/extensions/xml-language-features/.eslintrc.json b/extensions/xml-language-features/.eslintrc.json index cc1e40b5db..0b87813c38 100644 --- a/extensions/xml-language-features/.eslintrc.json +++ b/extensions/xml-language-features/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "@typescript-eslint/explicit-function-return-type": ["off"] + "@typescript-eslint/explicit-function-return-type": ["off"], + "@typescript-eslint/await-thenable": ["off"] } } diff --git a/package.json b/package.json index 3c248d5c91..3afc974c68 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "web": "node resources/web/code-web.js", "compile-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-web", "watch-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-web", - "eslint": "node build/eslint", + "eslint": "node --max_old_space_size=4095 build/eslint", "playwright-install": "node build/azure-pipelines/common/installPlaywright.js", "compile-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-build", "compile-extensions-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-extensions-build", @@ -57,8 +57,8 @@ "hygiene": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js hygiene", "core-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js core-ci", "extensions-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js extensions-ci", - "sqllint": "eslint --no-eslintrc -c .eslintrc.sql.ts.json --rulesdir ./build/lib/eslint --ext .ts ./src/sql", - "extensions-lint": "eslint --rulesdir ./build/lib/eslint --ext .ts ./extensions" + "sqllint": "node --max_old_space_size=4095 ./node_modules/eslint/bin/eslint.js --no-eslintrc -c .eslintrc.sql.ts.json --rulesdir ./build/lib/eslint --ext .ts ./src/sql", + "extensions-lint": "node --max_old_space_size=4095 ./node_modules/eslint/bin/eslint.js --rulesdir ./build/lib/eslint --ext .ts ./extensions" }, "dependencies": { "@angular/animations": "~4.1.3",