mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add explicit return type linting to some extensions (#19199)
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
}
|
||||
|
||||
6
extensions/agent/.eslintrc.json
Normal file
6
extensions/agent/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/arc/.eslintrc.json
Normal file
6
extensions/arc/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/azcli/.eslintrc.json
Normal file
6
extensions/azcli/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
],
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
6
extensions/azurehybridtoolkit/.eslintrc.json
Normal file
6
extensions/azurehybridtoolkit/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/azuremonitor/.eslintrc.json
Normal file
6
extensions/azuremonitor/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/big-data-cluster/.eslintrc.json
Normal file
6
extensions/big-data-cluster/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/cms/.eslintrc.json
Normal file
6
extensions/cms/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/configuration-editing/.eslintrc.json
Normal file
5
extensions/configuration-editing/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/dacpac/.eslintrc.json
Normal file
6
extensions/dacpac/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
],
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-cond-assign": 0
|
||||
"no-cond-assign": 0,
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
5
extensions/github-authentication/.eslintrc.json
Normal file
5
extensions/github-authentication/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/github/.eslintrc.json
Normal file
5
extensions/github/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/image-preview/.eslintrc.json
Normal file
5
extensions/image-preview/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/import/.eslintrc.json
Normal file
6
extensions/import/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/integration-tests/.eslintrc.json
Normal file
6
extensions/integration-tests/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/json-language-features/.eslintrc.json
Normal file
5
extensions/json-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/kusto/.eslintrc.json
Normal file
6
extensions/kusto/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/liveshare/.eslintrc.json
Normal file
6
extensions/liveshare/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/machine-learning/src/.eslintrc.json
Normal file
5
extensions/machine-learning/src/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/markdown-language-features/.eslintrc.json
Normal file
5
extensions/markdown-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/markdown-math/.eslintrc.json
Normal file
5
extensions/markdown-math/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/merge-conflict/.eslintrc.json
Normal file
5
extensions/merge-conflict/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/microsoft-authentication/.eslintrc.json
Normal file
5
extensions/microsoft-authentication/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
],
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
],
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
6
extensions/profiler/.eslintrc.json
Normal file
6
extensions/profiler/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/resource-deployment/.eslintrc.json
Normal file
6
extensions/resource-deployment/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/schema-compare/.eslintrc.json
Normal file
6
extensions/schema-compare/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/search-result/.eslintrc.json
Normal file
5
extensions/search-result/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/simple-browser/.eslintrc.json
Normal file
5
extensions/simple-browser/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
6
extensions/sql-assessment/.eslintrc.json
Normal file
6
extensions/sql-assessment/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
@@ -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<IExten
|
||||
return await createAzureFunction(node);
|
||||
}));
|
||||
return {
|
||||
addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string) => {
|
||||
addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus> => {
|
||||
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<string | undefined> => {
|
||||
return promptForObjectName(bindingType);
|
||||
},
|
||||
promptAndUpdateConnectionStringSetting: async (projectUri: vscode.Uri | undefined) => {
|
||||
promptAndUpdateConnectionStringSetting: async (projectUri: vscode.Uri | undefined): Promise<string | undefined> => {
|
||||
return promptAndUpdateConnectionStringSetting(projectUri);
|
||||
},
|
||||
getAzureFunctions: async (filePath: string) => {
|
||||
getAzureFunctions: async (filePath: string): Promise<GetAzureFunctionsResult> => {
|
||||
return getAzureFunctions(filePath);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
],
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
|
||||
6
extensions/sql-migration/.eslintrc.json
Normal file
6
extensions/sql-migration/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"rules": {
|
||||
// Disabled until the issues can be fixed
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/vscode-test-resolver/.eslintrc.json
Normal file
5
extensions/vscode-test-resolver/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
5
extensions/xml-language-features/.eslintrc.json
Normal file
5
extensions/xml-language-features/.eslintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": ["off"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user