Skip to content

Commit

Permalink
Update eslint-config to enforce import types (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 authored Nov 29, 2023
1 parent 5306f6e commit c704909
Show file tree
Hide file tree
Showing 98 changed files with 244 additions and 244 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 @@ -781,7 +781,7 @@
"prepare": "husky install"
},
"devDependencies": {
"@microsoft/eslint-config-azuretools": "^0.2.1",
"@microsoft/eslint-config-azuretools": "^0.2.2",
"@microsoft/vscode-azext-dev": "^2.0.2",
"@types/dotenv": "^6.1.1",
"@types/fs-extra": "^8.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/AppServiceFileSystem.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 { FileTreeItem, getFile, ISiteFile, putFile } from "@microsoft/vscode-azext-azureappservice";
import { AzExtTreeFileSystem, DialogResponses, IActionContext, IParsedError, parseError, UserCancelledError } from '@microsoft/vscode-azext-utils';
import { FileStat, FileType, MessageItem, Uri } from "vscode";
import { getFile, putFile, type FileTreeItem, type ISiteFile } from "@microsoft/vscode-azext-azureappservice";
import { AzExtTreeFileSystem, DialogResponses, UserCancelledError, parseError, type IActionContext, type IParsedError } from '@microsoft/vscode-azext-utils';
import { FileType, type FileStat, type MessageItem, type Uri } from "vscode";
import { ext } from "./extensionVariables";
import { localize } from "./localize";
import { nonNullValue } from "./utils/nonNull";
Expand Down
6 changes: 3 additions & 3 deletions src/WebAppResolver.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 { ResolvedWebAppResource } from "./tree/ResolvedWebAppResource";
import { createWebSiteClient } from "./utils/azureClients";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/api/revealTreeItem.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 { AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils";
import { callWithTelemetryAndErrorHandling, type AzExtTreeItem, type IActionContext } from "@microsoft/vscode-azext-utils";
import { ext } from "../../extensionVariables";

export async function revealTreeItem(resourceId: string): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/addAppSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AppSettingsTreeItem } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/deleteAppSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AppSettingTreeItem } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";

Expand Down
8 changes: 4 additions & 4 deletions src/commands/appSettings/downloadAppSettings.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 { StringDictionary } from "@azure/arm-appservice";
import { type StringDictionary } from "@azure/arm-appservice";
import { confirmOverwriteSettings } from "@microsoft/vscode-azext-azureappservice";
import { AppSettingsTreeItem, IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext, UserCancelledError } from "@microsoft/vscode-azext-utils";
import { DotenvParseOutput } from "dotenv";
import { AppSettingsTreeItem, type IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings";
import { UserCancelledError, type IActionContext } from "@microsoft/vscode-azext-utils";
import { type DotenvParseOutput } from "dotenv";
import * as fse from 'fs-extra';
import * as os from 'os';
import * as vscode from 'vscode';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/editAppSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AppSettingTreeItem } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";

Expand Down
4 changes: 2 additions & 2 deletions src/commands/appSettings/getLocalEnvironmentVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IActionContext, parseError } from '@microsoft/vscode-azext-utils';
import { parseError, type IActionContext } from '@microsoft/vscode-azext-utils';
import * as dotenv from 'dotenv';
import * as fse from 'fs-extra';
import { MessageItem } from 'vscode';
import { type MessageItem } from 'vscode';
import { localize } from '../../localize';

export async function getLocalEnvironmentVariables(context: IActionContext, localSettingsPath: string, allowOverwrite: boolean = false): Promise<dotenv.DotenvParseOutput> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/renameAppSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AppSettingTreeItem } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";

Expand Down
2 changes: 1 addition & 1 deletion src/commands/appSettings/toggleSlotSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { AppSettingTreeItem } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";

Expand Down
8 changes: 4 additions & 4 deletions src/commands/appSettings/uploadAppSettings.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 { StringDictionary } from "@azure/arm-appservice";
import { type StringDictionary } from "@azure/arm-appservice";
import { confirmOverwriteSettings } from "@microsoft/vscode-azext-azureappservice";
import { AppSettingsTreeItem, IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import * as dotenv from 'dotenv';
import { AppSettingsTreeItem, type IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import type * as dotenv from 'dotenv';
import { Uri, window } from "vscode";
import { envFileName, webAppFilter } from "../../constants";
import { ext } from "../../extensionVariables";
Expand Down
4 changes: 2 additions & 2 deletions src/commands/browseWebsite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { IActionContext } from '@microsoft/vscode-azext-utils';
import { ISiteTreeItem } from '../tree/ISiteTreeItem';
import { type IActionContext } from '@microsoft/vscode-azext-utils';
import { type ISiteTreeItem } from '../tree/ISiteTreeItem';
import { pickWebApp } from '../utils/pickWebApp';

export async function browseWebsite(context: IActionContext, node?: ISiteTreeItem): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connections/addCosmosDBConnection.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 { AzExtParentTreeItem, AzExtTreeItem, IActionContext } from '@microsoft/vscode-azext-utils';
import { type AzExtParentTreeItem, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils';
import { webAppFilter } from '../../constants';
import { ext } from "../../extensionVariables";
import { CosmosDBTreeItem } from '../../tree/CosmosDBTreeItem';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connections/removeCosmosDBConnection.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 } from '@microsoft/vscode-azext-utils';
import { type IActionContext } from '@microsoft/vscode-azext-utils';
import { webAppFilter } from '../../constants';
import { ext } from "../../extensionVariables";
import { CosmosDBConnection } from '../../tree/CosmosDBConnection';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connections/revealConnection.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 } from '@microsoft/vscode-azext-utils';
import { type IActionContext } from '@microsoft/vscode-azext-utils';
import { webAppFilter } from '../../constants';
import { ext } from "../../extensionVariables";
import { CosmosDBConnection } from '../../tree/CosmosDBConnection';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connections/revealConnectionInAppSettings.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 { AzExtTreeItem, IActionContext } from '@microsoft/vscode-azext-utils';
import { type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils';
import { webAppFilter } from '../../constants';
import { ext } from "../../extensionVariables";
import { localize } from '../../localize';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/createSlot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { SiteConfigResource } from "@azure/arm-appservice";
import { IActionContext } from "@microsoft/vscode-azext-utils";
import { type SiteConfigResource } from "@azure/arm-appservice";
import { type IActionContext } from "@microsoft/vscode-azext-utils";
import { ScmType, webAppFilter } from "../constants";
import { ext } from "../extensionVariables";
import { localize } from "../localize";
import { DeploymentSlotsTreeItem } from "../tree/DeploymentSlotsTreeItem";
import { SiteTreeItem } from "../tree/SiteTreeItem";
import { type SiteTreeItem } from "../tree/SiteTreeItem";
import { showCreatedWebAppMessage } from "./createWebApp/showCreatedWebAppMessage";
import { editScmType } from "./deployments/editScmType";

Expand Down
8 changes: 4 additions & 4 deletions src/commands/createWebApp/IWebAppWizardContext.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 { IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice';
import { ExecuteActivityContext } from '@microsoft/vscode-azext-utils';
import { AppStackMajorVersion, AppStackMinorVersion } from './stacks/models/AppStackModel';
import { JavaContainers, WebAppRuntimes, WebAppStack, WebAppStackValue } from './stacks/models/WebAppStackModel';
import { type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice';
import { type ExecuteActivityContext } from '@microsoft/vscode-azext-utils';
import { type AppStackMajorVersion, type AppStackMinorVersion } from './stacks/models/AppStackModel';
import { type JavaContainers, type WebAppRuntimes, type WebAppStack, type WebAppStackValue } from './stacks/models/WebAppStackModel';

export type FullWebAppStack = {
stack: WebAppStack;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/createWebApp/SetPostPromptDefaultsStep.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 { SiteNameStep } from "@microsoft/vscode-azext-azureappservice";
import { type SiteNameStep } from "@microsoft/vscode-azext-azureappservice";
import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils";
import { localize } from "../../localize";
import { IWebAppWizardContext } from "./IWebAppWizardContext";
import { type IWebAppWizardContext } from "./IWebAppWizardContext";
import { setPostPromptDefaults } from "./setPostPromptDefaults";

export class SetPostPromptDefaultsStep extends AzureWizardExecuteStep<IWebAppWizardContext> {
Expand Down
12 changes: 6 additions & 6 deletions src/commands/createWebApp/WebAppCreateStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { NameValuePair, Site, SiteConfig, WebSiteManagementClient } from '@azure/arm-appservice';
import { CustomLocation, WebsiteOS } from '@microsoft/vscode-azext-azureappservice';
import { type NameValuePair, type Site, type SiteConfig, type WebSiteManagementClient } from '@azure/arm-appservice';
import { WebsiteOS, type CustomLocation } from '@microsoft/vscode-azext-azureappservice';
import { LocationListStep } from '@microsoft/vscode-azext-azureutils';
import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils';
import { AppResource } from '@microsoft/vscode-azext-utils/hostapi';
import { Progress } from 'vscode';
import { type AppResource } from '@microsoft/vscode-azext-utils/hostapi';
import { type Progress } from 'vscode';
import * as constants from '../../constants';
import { ext } from '../../extensionVariables';
import { localize } from '../../localize';
import { createWebSiteClient } from '../../utils/azureClients';
import { nonNullProp } from '../../utils/nonNull';
import { FullJavaStack, FullWebAppStack, IWebAppWizardContext } from './IWebAppWizardContext';
import { type FullJavaStack, type FullWebAppStack, type IWebAppWizardContext } from './IWebAppWizardContext';
import { getJavaLinuxRuntime } from './stacks/getJavaLinuxRuntime';
import { WebAppStackValue, WindowsJavaContainerSettings } from './stacks/models/WebAppStackModel';
import { type WebAppStackValue, type WindowsJavaContainerSettings } from './stacks/models/WebAppStackModel';

export class WebAppCreateStep extends AzureWizardExecuteStep<IWebAppWizardContext> {
public priority: number = 140;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/createWebApp/createWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import { AppInsightsCreateStep, AppInsightsListStep, AppKind, AppServicePlanCreateStep, AppServicePlanListStep, AppServicePlanSkuStep, CustomLocationListStep, ParsedSite, setLocationsTask, SiteNameStep } from "@microsoft/vscode-azext-azureappservice";
import { LocationListStep, ResourceGroupCreateStep, ResourceGroupListStep, SubscriptionTreeItemBase, VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils";
import { AzExtParentTreeItem, AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, IActionContext, ICreateChildImplContext, nonNullProp, parseError } from "@microsoft/vscode-azext-utils";
import { AzureWizard, nonNullProp, parseError, type AzExtParentTreeItem, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext, type ICreateChildImplContext } from "@microsoft/vscode-azext-utils";
import { webProvider } from "../../constants";
import { ext } from "../../extensionVariables";
import { localize } from "../../localize";
import { SiteTreeItem } from "../../tree/SiteTreeItem";
import { createActivityContext } from "../../utils/activityUtils";
import { IWebAppWizardContext } from "./IWebAppWizardContext";
import { type IWebAppWizardContext } from "./IWebAppWizardContext";
import { SetPostPromptDefaultsStep } from "./SetPostPromptDefaultsStep";
import { setPrePromptDefaults } from "./setPrePromptDefaults";
import { getCreatedWebAppMessage, showCreatedWebAppMessage } from "./showCreatedWebAppMessage";
Expand Down
6 changes: 3 additions & 3 deletions src/commands/createWebApp/readAzConfig.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 { WorkspaceFolder } from 'vscode';
import { IDeployContext } from '@microsoft/vscode-azext-azureappservice';
import { type IDeployContext } from '@microsoft/vscode-azext-azureappservice';
import { type WorkspaceFolder } from 'vscode';
import { cpUtils } from '../../utils/cpUtils';
import { getSingleRootWorkspace } from '../../utils/workspace';
import { IWebAppWizardContext } from './IWebAppWizardContext';
import { type IWebAppWizardContext } from './IWebAppWizardContext';

/**
* Takes any number of Azure config properties to read and returns their configured values.
Expand Down
Loading

0 comments on commit c704909

Please sign in to comment.