Skip to content

Commit

Permalink
Update eslint-config to enforce import types (#3918)
Browse files Browse the repository at this point in the history
* Update imports using import type

* change
  • Loading branch information
motm32 authored Dec 5, 2023
1 parent d080d3b commit 6a7a02a
Show file tree
Hide file tree
Showing 343 changed files with 983 additions and 983 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@
},
"devDependencies": {
"@azure/arm-resources": "^5.2.0",
"@microsoft/eslint-config-azuretools": "^0.2.1",
"@microsoft/eslint-config-azuretools": "^0.2.2",
"@microsoft/vscode-azext-dev": "^2.0.2",
"@types/fs-extra": "^8.1.0",
"@types/gulp": "^4.0.10",
Expand Down
2 changes: 1 addition & 1 deletion src/FuncVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { IActionContext, IAzureQuickPickItem, IAzureQuickPickOptions } from '@microsoft/vscode-azext-utils';
import { type IActionContext, type IAzureQuickPickItem, type IAzureQuickPickOptions } from '@microsoft/vscode-azext-utils';
import { localize } from './localize';
import { openUrl } from './utils/openUrl';

Expand Down
6 changes: 3 additions & 3 deletions src/FunctionAppResolver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Site } from "@azure/arm-appservice";
import { type Site } from "@azure/arm-appservice";
import { uiUtils } from "@microsoft/vscode-azext-azureutils";
import { IActionContext, ISubscriptionContext, callWithTelemetryAndErrorHandling, nonNullProp, nonNullValue } from "@microsoft/vscode-azext-utils";
import { AppResource, AppResourceResolver } from "@microsoft/vscode-azext-utils/hostapi";
import { callWithTelemetryAndErrorHandling, nonNullProp, nonNullValue, type IActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils";
import { type AppResource, type AppResourceResolver } from "@microsoft/vscode-azext-utils/hostapi";
import { ResolvedFunctionAppResource } from "./tree/ResolvedFunctionAppResource";
import { createWebSiteClient } from "./utils/azureClients";

Expand Down
6 changes: 3 additions & 3 deletions src/LocalResourceProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzExtParentTreeItem, AzExtTreeItem } from "@microsoft/vscode-azext-utils";
import { WorkspaceResourceProvider } from "@microsoft/vscode-azext-utils/hostapi";
import { type AzExtParentTreeItem, type AzExtTreeItem } from "@microsoft/vscode-azext-utils";
import { type WorkspaceResourceProvider } from "@microsoft/vscode-azext-utils/hostapi";
import { Disposable } from "vscode";
import { InitLocalProjectTreeItem } from "./tree/localProject/InitLocalProjectTreeItem";
import { InvalidLocalProjectTreeItem } from "./tree/localProject/InvalidLocalProjectTreeItem";
import { LocalProjectTreeItem } from "./tree/localProject/LocalProjectTreeItem";
import { LocalProjectInternal, listLocalProjects } from "./workspace/listLocalProjects";
import { listLocalProjects, type LocalProjectInternal } from "./workspace/listLocalProjects";

export class FunctionsLocalResourceProvider implements WorkspaceResourceProvider {

Expand Down
8 changes: 4 additions & 4 deletions src/commands/addBinding/BindingCreateStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*--------------------------------------------------------------------------------------------*/

import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils";
import { Progress, Uri, window, workspace } from "vscode";
import { IFunctionBinding, IFunctionJson } from "../../funcConfig/function";
import { IBindingTemplate } from "../../templates/IBindingTemplate";
import { Uri, window, workspace, type Progress } from "vscode";
import { type IFunctionBinding, type IFunctionJson } from "../../funcConfig/function";
import { type IBindingTemplate } from "../../templates/IBindingTemplate";
import { confirmEditJsonFile } from '../../utils/fs';
import { nonNullProp } from "../../utils/nonNull";
import { verifyExtensionBundle } from "../../utils/verifyExtensionBundle";
import { getBindingSetting } from "../createFunction/IFunctionWizardContext";
import { IBindingWizardContext } from "./IBindingWizardContext";
import { type IBindingWizardContext } from "./IBindingWizardContext";

export class BindingCreateStep extends AzureWizardExecuteStep<IBindingWizardContext> {
public priority: number = 220;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/addBinding/BindingDirectionStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { AzureWizardPromptStep, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils';
import { AzureWizardPromptStep, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils';
import { localize } from '../../localize';
import { IBindingWizardContext } from './IBindingWizardContext';
import { type IBindingWizardContext } from './IBindingWizardContext';

export class BindingDirectionStep extends AzureWizardPromptStep<IBindingWizardContext> {
public hideStepCount: boolean = true;
Expand Down
10 changes: 5 additions & 5 deletions src/commands/addBinding/BindingListStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils';
import { ProjectLanguage } from '../../constants';
import { AzureWizardPromptStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils';
import { type FuncVersion } from '../../FuncVersion';
import { type ProjectLanguage } from '../../constants';
import { ext } from '../../extensionVariables';
import { FuncVersion } from '../../FuncVersion';
import { localize } from '../../localize';
import { IBindingTemplate } from '../../templates/IBindingTemplate';
import { type IBindingTemplate } from '../../templates/IBindingTemplate';
import { nonNullProp } from '../../utils/nonNull';
import { IBindingWizardContext } from './IBindingWizardContext';
import { type IBindingWizardContext } from './IBindingWizardContext';
import { addBindingSettingSteps } from './settingSteps/addBindingSettingSteps';

export class BindingListStep extends AzureWizardPromptStep<IBindingWizardContext> {
Expand Down
10 changes: 5 additions & 5 deletions src/commands/addBinding/IBindingWizardContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { ProjectLanguage } from "../../constants";
import { IFunctionBinding } from "../../funcConfig/function";
import { FuncVersion } from "../../FuncVersion";
import { IBindingTemplate } from "../../templates/IBindingTemplate";
import { IFunctionWizardContext } from "../createFunction/IFunctionWizardContext";
import { type ProjectLanguage } from "../../constants";
import { type IFunctionBinding } from "../../funcConfig/function";
import { type FuncVersion } from "../../FuncVersion";
import { type IBindingTemplate } from "../../templates/IBindingTemplate";
import { type IFunctionWizardContext } from "../createFunction/IFunctionWizardContext";

export interface IBindingWizardContext extends IFunctionWizardContext {
functionJsonPath: string;
Expand Down
14 changes: 7 additions & 7 deletions src/commands/addBinding/addBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { AzureWizard, IActionContext } from "@microsoft/vscode-azext-utils";
import { Uri, WorkspaceFolder } from "vscode";
import { ProjectLanguage, projectTemplateKeySetting } from "../../constants";
import { type AzureWizard, type IActionContext } from "@microsoft/vscode-azext-utils";
import { Uri, type WorkspaceFolder } from "vscode";
import { type FuncVersion } from "../../FuncVersion";
import { projectTemplateKeySetting, type ProjectLanguage } from "../../constants";
import { ext } from "../../extensionVariables";
import { FuncVersion } from "../../FuncVersion";
import { localize } from "../../localize";
import { LocalFunctionTreeItem } from "../../tree/localProject/LocalFunctionTreeItem";
import { LocalProjectTreeItem } from "../../tree/localProject/LocalProjectTreeItem";
import { type LocalFunctionTreeItem } from "../../tree/localProject/LocalFunctionTreeItem";
import { type LocalProjectTreeItem } from "../../tree/localProject/LocalProjectTreeItem";
import { nonNullValue } from "../../utils/nonNull";
import { getContainingWorkspace } from "../../utils/workspace";
import { getWorkspaceSetting } from "../../vsCodeConfig/settings";
import { verifyInitForVSCode } from "../../vsCodeConfig/verifyInitForVSCode";
import { tryGetFunctionProjectRoot } from "../createNewProject/verifyIsProject";
import { type IBindingWizardContext } from "./IBindingWizardContext";
import { createBindingWizard } from "./createBindingWizard";
import { IBindingWizardContext } from "./IBindingWizardContext";

export async function addBinding(context: IActionContext, data: Uri | LocalFunctionTreeItem | undefined): Promise<void> {
let functionJsonPath: string;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/addBinding/createBindingWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { localize } from "../../localize";
import { BindingCreateStep } from "./BindingCreateStep";
import { BindingDirectionStep } from "./BindingDirectionStep";
import { BindingListStep } from "./BindingListStep";
import { IBindingWizardContext } from "./IBindingWizardContext";
import { type IBindingWizardContext } from "./IBindingWizardContext";

export function createBindingWizard(wizardContext: IBindingWizardContext): AzureWizard<IBindingWizardContext> {
return new AzureWizard(wizardContext, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*--------------------------------------------------------------------------------------------*/

import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils';
import { Progress } from 'vscode';
import { type Progress } from 'vscode';
import { setLocalAppSetting } from '../../../funcConfig/local.settings';
import { localize } from '../../../localize';
import { IBindingSetting } from '../../../templates/IBindingTemplate';
import { type IBindingSetting } from '../../../templates/IBindingTemplate';
import { nonNullProp } from '../../../utils/nonNull';
import { setBindingSetting } from '../../createFunction/IFunctionWizardContext';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { type IBindingWizardContext } from '../IBindingWizardContext';

export interface IConnection {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/addBinding/settingSteps/BindingNameStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { AzExtFsExtra } from '@microsoft/vscode-azext-utils';
import { ParsedFunctionJson } from '../../../funcConfig/function';
import { localize } from '../../../localize';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { type IBindingWizardContext } from '../IBindingWizardContext';
import { StringPromptStep } from './StringPromptStep';

export class BindingNameStep extends StringPromptStep {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/

import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils";
import { BindingSettingValue } from "../../../funcConfig/function";
import { IBindingSetting } from "../../../templates/IBindingTemplate";
import { type BindingSettingValue } from "../../../funcConfig/function";
import { type IBindingSetting } from "../../../templates/IBindingTemplate";
import { getBindingSetting, setBindingSetting } from "../../createFunction/IFunctionWizardContext";
import { IBindingWizardContext } from "../IBindingWizardContext";
import { type IBindingWizardContext } from "../IBindingWizardContext";

export abstract class BindingSettingStepBase extends AzureWizardPromptStep<IBindingWizardContext> {
protected readonly _setting: IBindingSetting;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/addBinding/settingSteps/BooleanPromptStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { BindingSettingValue } from "../../../funcConfig/function";
import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { type BindingSettingValue } from "../../../funcConfig/function";
import { envUtils } from "../../../utils/envUtils";
import { IBindingWizardContext } from "../IBindingWizardContext";
import { type IBindingWizardContext } from "../IBindingWizardContext";
import { BindingSettingStepBase } from "./BindingSettingStepBase";

export class BooleanPromptStep extends BindingSettingStepBase {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/addBinding/settingSteps/EnumPromptStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { BindingSettingValue } from "../../../funcConfig/function";
import { IBindingWizardContext } from "../IBindingWizardContext";
import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { type BindingSettingValue } from "../../../funcConfig/function";
import { type IBindingWizardContext } from "../IBindingWizardContext";
import { BindingSettingStepBase } from "./BindingSettingStepBase";

export class EnumPromptStep extends BindingSettingStepBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*--------------------------------------------------------------------------------------------*/

import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils';
import { Progress } from 'vscode';
import { type Progress } from 'vscode';
import { localSettingsFileName } from '../../../constants';
import { setLocalAppSetting } from '../../../funcConfig/local.settings';
import { localize } from '../../../localize';
import { IBindingSetting } from '../../../templates/IBindingTemplate';
import { type IBindingSetting } from '../../../templates/IBindingTemplate';
import { nonNullProp, nonNullValue } from '../../../utils/nonNull';
import { getBindingSetting } from '../../createFunction/IFunctionWizardContext';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { type IBindingWizardContext } from '../IBindingWizardContext';

export class LocalAppSettingCreateStep extends AzureWizardExecuteStep<IBindingWizardContext> {
public priority: number = 210;
Expand Down
12 changes: 6 additions & 6 deletions src/commands/addBinding/settingSteps/LocalAppSettingListStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
*--------------------------------------------------------------------------------------------*/

import { StorageAccountKind, StorageAccountListStep, StorageAccountPerformance, StorageAccountReplication } from '@microsoft/vscode-azext-azureutils';
import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, ISubscriptionActionContext, IWizardOptions } from '@microsoft/vscode-azext-utils';
import { type AzureWizardExecuteStep, type AzureWizardPromptStep, type IAzureQuickPickItem, type ISubscriptionActionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils';
import * as path from 'path';
import { localSettingsFileName } from '../../../constants';
import { ext } from '../../../extensionVariables';
import { BindingSettingValue } from '../../../funcConfig/function';
import { ILocalSettingsJson, getLocalSettingsJson } from '../../../funcConfig/local.settings';
import { type BindingSettingValue } from '../../../funcConfig/function';
import { getLocalSettingsJson, type ILocalSettingsJson } from '../../../funcConfig/local.settings';
import { localize } from '../../../localize';
import { ResourceType } from '../../../templates/IBindingTemplate';
import { EventHubsNamespaceListStep } from '../../createFunction/durableSteps/netherite/EventHubsNamespaceListStep';
import { type IEventHubsConnectionWizardContext } from '../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext';
import { getBindingSetting } from '../../createFunction/IFunctionWizardContext';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { IEventHubsConnectionWizardContext } from '../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext';
import { EventHubsNamespaceListStep } from '../../createFunction/durableSteps/netherite/EventHubsNamespaceListStep';
import { type IBindingWizardContext } from '../IBindingWizardContext';
import { BindingSettingStepBase } from './BindingSettingStepBase';
import { LocalAppSettingCreateStep } from './LocalAppSettingCreateStep';
import { LocalAppSettingNameStep } from './LocalAppSettingNameStep';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { BindingSettingValue } from '../../../funcConfig/function';
import { type BindingSettingValue } from '../../../funcConfig/function';
import { localize } from '../../../localize';
import { nonNullProp } from '../../../utils/nonNull';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { type IBindingWizardContext } from '../IBindingWizardContext';
import { BindingSettingStepBase } from './BindingSettingStepBase';

export class LocalAppSettingNameStep extends BindingSettingStepBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils';
import { localize } from '../../../localize';
import { IBindingWizardContext } from '../IBindingWizardContext';
import { type IBindingWizardContext } from '../IBindingWizardContext';

export class LocalAppSettingValueStep extends AzureWizardPromptStep<IBindingWizardContext> {
private readonly _key: string;
Expand Down
Loading

0 comments on commit 6a7a02a

Please sign in to comment.