diff --git a/extensions/.eslintrc.json b/extensions/.eslintrc.json index ea3fdc0225..c50b683b79 100644 --- a/extensions/.eslintrc.json +++ b/extensions/.eslintrc.json @@ -1,6 +1,7 @@ { "rules": { "no-cond-assign": 2, - "jsdoc/check-param-names": "error" + "jsdoc/check-param-names": "error", + "@typescript-eslint/explicit-function-return-type": ["error"] } } diff --git a/extensions/agent/.eslintrc.json b/extensions/agent/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/agent/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/arc/.eslintrc.json b/extensions/arc/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/arc/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/azcli/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/azurecore/.eslintrc.json b/extensions/azurecore/.eslintrc.json index 17c0ebcd6f..07ad1d0e38 100644 --- a/extensions/azurecore/.eslintrc.json +++ b/extensions/azurecore/.eslintrc.json @@ -8,6 +8,8 @@ { "ignoreVoid": true } - ] + ], + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/azurehybridtoolkit/.eslintrc.json b/extensions/azurehybridtoolkit/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/azurehybridtoolkit/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/azuremonitor/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/big-data-cluster/.eslintrc.json b/extensions/big-data-cluster/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/big-data-cluster/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/cms/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/configuration-editing/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/dacpac/.eslintrc.json b/extensions/dacpac/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/dacpac/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/data-workspace/.eslintrc.json b/extensions/data-workspace/.eslintrc.json index 2570d1e18a..26287c3969 100644 --- a/extensions/data-workspace/.eslintrc.json +++ b/extensions/data-workspace/.eslintrc.json @@ -8,6 +8,8 @@ { "ignoreVoid": true } - ] + ], + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/git/.eslintrc.json b/extensions/git/.eslintrc.json index 7fe7992b97..8441dfbabe 100644 --- a/extensions/git/.eslintrc.json +++ b/extensions/git/.eslintrc.json @@ -1,5 +1,6 @@ { "rules": { - "no-cond-assign": 0 + "no-cond-assign": 0, + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/github-authentication/.eslintrc.json b/extensions/github-authentication/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/github-authentication/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/github/.eslintrc.json b/extensions/github/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/github/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/image-preview/.eslintrc.json b/extensions/image-preview/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/image-preview/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/import/.eslintrc.json b/extensions/import/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/import/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/integration-tests/.eslintrc.json b/extensions/integration-tests/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/integration-tests/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/json-language-features/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/kusto/.eslintrc.json b/extensions/kusto/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/kusto/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/liveshare/.eslintrc.json b/extensions/liveshare/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/liveshare/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/machine-learning/src/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/markdown-language-features/.eslintrc.json b/extensions/markdown-language-features/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/markdown-language-features/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/markdown-math/.eslintrc.json b/extensions/markdown-math/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/markdown-math/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/merge-conflict/.eslintrc.json b/extensions/merge-conflict/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/merge-conflict/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/microsoft-authentication/.eslintrc.json b/extensions/microsoft-authentication/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/microsoft-authentication/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/mssql/.eslintrc.json b/extensions/mssql/.eslintrc.json index a34b018629..d4b738118d 100644 --- a/extensions/mssql/.eslintrc.json +++ b/extensions/mssql/.eslintrc.json @@ -8,6 +8,8 @@ { "ignoreVoid": true } - ] + ], + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/notebook/.eslintrc.json b/extensions/notebook/.eslintrc.json index 0351fcd0d3..d9d38599c2 100644 --- a/extensions/notebook/.eslintrc.json +++ b/extensions/notebook/.eslintrc.json @@ -8,6 +8,8 @@ { "ignoreVoid": true } - ] + ], + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/profiler/.eslintrc.json b/extensions/profiler/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/profiler/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/resource-deployment/.eslintrc.json b/extensions/resource-deployment/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/resource-deployment/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/schema-compare/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/search-result/.eslintrc.json b/extensions/search-result/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/search-result/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/simple-browser/.eslintrc.json b/extensions/simple-browser/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/simple-browser/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/sql-assessment/.eslintrc.json b/extensions/sql-assessment/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/sql-assessment/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/sql-bindings/src/common/constants.ts b/extensions/sql-bindings/src/common/constants.ts index 00770e5607..4fb88d00c1 100644 --- a/extensions/sql-bindings/src/common/constants.ts +++ b/extensions/sql-bindings/src/common/constants.ts @@ -68,9 +68,9 @@ export const enterConnectionStringSettingName = localize('enterConnectionStringS export const enterConnectionString = localize('enterConnectionString', "Enter connection string"); export const saveChangesInFile = localize('saveChangesInFile', "There are unsaved changes in the current file. Save now?"); export const save = localize('save', "Save"); -export function settingAlreadyExists(settingName: string) { return localize('SettingAlreadyExists', 'Local app setting \'{0}\' already exists. Overwrite?', settingName); } -export function failedToParse(errorMessage: string) { return localize('failedToParse', 'Failed to parse "{0}": {1}.', azureFunctionLocalSettingsFileName, errorMessage); } -export function jsonParseError(error: string, line: number, column: number) { return localize('jsonParseError', '{0} near line "{1}", column "{2}"', error, line, column); } +export function settingAlreadyExists(settingName: string): string { return localize('SettingAlreadyExists', 'Local app setting \'{0}\' already exists. Overwrite?', settingName); } +export function failedToParse(errorMessage: string): string { return localize('failedToParse', 'Failed to parse "{0}": {1}.', azureFunctionLocalSettingsFileName, errorMessage); } +export function jsonParseError(error: string, line: number, column: number): string { return localize('jsonParseError', '{0} near line "{1}", column "{2}"', error, line, column); } export const moreInformation = localize('moreInformation', "More Information"); export const addPackageReferenceMessage = localize('addPackageReferenceMessage', 'To use SQL bindings, ensure your Azure Functions project has a reference to {0}', sqlExtensionPackageName); export const addSqlBindingPackageError = localize('addSqlBindingPackageError', 'Error adding Sql Binding extension package to project'); @@ -78,11 +78,11 @@ export const failedToGetConnectionString = localize('failedToGetConnectionString export const connectionProfile = localize('connectionProfile', 'Select a connection profile'); export const userConnectionString = localize('userConnectionString', 'Enter connection string'); export const selectConnectionString = localize('selectConnectionString', 'Select SQL connection string method'); -export const selectConnectionError = (err?: any) => err ? localize('selectConnectionError', "Failed to set connection string app setting: {0}", utils.getErrorMessage(err)) : localize('unableToSetConnectionString', "Failed to set connection string app setting"); +export const selectConnectionError = (err?: any): string => err ? localize('selectConnectionError', "Failed to set connection string app setting: {0}", utils.getErrorMessage(err)) : localize('unableToSetConnectionString', "Failed to set connection string app setting"); export const includePassword = localize('includePassword', 'Do you want to include the password from this connection in your local.settings.json file?'); export const enterPasswordPrompt = localize('enterPasswordPrompt', 'Enter the password to be used for the connection string'); export const enterPasswordManually = localize('enterPasswordManually', 'Enter password or press escape to cancel'); export const userPasswordLater = localize('userPasswordLater', 'In order to user the SQL connection string later you will need to manually enter the password in your local.settings.json file.'); export const openFile = localize('openFile', "Open File"); export const closeButton = localize('closeButton', "Close"); -export function addSqlBinding(functionName: string) { return localize('addSqlBinding', 'Adding SQL Binding to function "{0}"...'), functionName; } +export function addSqlBinding(functionName: string): string { return localize('addSqlBinding', 'Adding SQL Binding to function "{0}"...'), functionName; } diff --git a/extensions/sql-bindings/src/extension.ts b/extensions/sql-bindings/src/extension.ts index f9cd68b439..990275677a 100644 --- a/extensions/sql-bindings/src/extension.ts +++ b/extensions/sql-bindings/src/extension.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { ITreeNodeInfo } from 'vscode-mssql'; -import { IExtension, BindingType } from 'sql-bindings'; +import { IExtension, BindingType, GetAzureFunctionsResult, ResultStatus } from 'sql-bindings'; import { getAzdataApi } from './common/utils'; import { addSqlBinding, createAzureFunction, getAzureFunctions } from './services/azureFunctionsService'; import { launchAddSqlBindingQuickpick } from './dialogs/addSqlBindingQuickpick'; @@ -19,19 +19,19 @@ export async function activate(context: vscode.ExtensionContext): Promise { + addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise => { return addSqlBinding(bindingType, filePath, functionName, objectName, connectionStringSetting); }, - promptForBindingType: async () => { + promptForBindingType: async (): Promise<(vscode.QuickPickItem & { type: BindingType }) | undefined> => { return promptForBindingType(); }, - promptForObjectName: async (bindingType: BindingType) => { + promptForObjectName: async (bindingType: BindingType): Promise => { return promptForObjectName(bindingType); }, - promptAndUpdateConnectionStringSetting: async (projectUri: vscode.Uri | undefined) => { + promptAndUpdateConnectionStringSetting: async (projectUri: vscode.Uri | undefined): Promise => { return promptAndUpdateConnectionStringSetting(projectUri); }, - getAzureFunctions: async (filePath: string) => { + getAzureFunctions: async (filePath: string): Promise => { return getAzureFunctions(filePath); } }; diff --git a/extensions/sql-database-projects/.eslintrc.json b/extensions/sql-database-projects/.eslintrc.json index 7c2a452eeb..dc1af000e8 100644 --- a/extensions/sql-database-projects/.eslintrc.json +++ b/extensions/sql-database-projects/.eslintrc.json @@ -8,6 +8,8 @@ { "ignoreVoid": true } - ] + ], + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] } } diff --git a/extensions/sql-migration/.eslintrc.json b/extensions/sql-migration/.eslintrc.json new file mode 100644 index 0000000000..a75d4af2a5 --- /dev/null +++ b/extensions/sql-migration/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + // Disabled until the issues can be fixed + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/vscode-test-resolver/.eslintrc.json b/extensions/vscode-test-resolver/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/vscode-test-resolver/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +} diff --git a/extensions/xml-language-features/.eslintrc.json b/extensions/xml-language-features/.eslintrc.json new file mode 100644 index 0000000000..cc1e40b5db --- /dev/null +++ b/extensions/xml-language-features/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": ["off"] + } +}