Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint-config] break: enforce consistent type imports/exports #6478

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 9 additions & 2 deletions packages/core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,22 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Intent, MaybeElement, Props } from "../../common";
import {
AbstractPureComponent,
Classes,
DISPLAYNAME_PREFIX,
type Intent,
type MaybeElement,
type Props,
} from "../../common";
import {
ALERT_WARN_CANCEL_ESCAPE_KEY,
ALERT_WARN_CANCEL_OUTSIDE_CLICK,
ALERT_WARN_CANCEL_PROPS,
} from "../../common/errors";
import { Button } from "../button/buttons";
import { Dialog } from "../dialog/dialog";
import { Icon, IconName } from "../icon/icon";
import { Icon, type IconName } from "../icon/icon";
import type { OverlayLifecycleProps } from "../overlay/overlay";

export interface AlertProps extends OverlayLifecycleProps, Props {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/breadcrumbs/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import classNames from "classnames";
import * as React from "react";

import { ActionProps, Classes, LinkProps } from "../../common";
import { type ActionProps, Classes, type LinkProps } from "../../common";
import { Icon } from "../icon/icon";

export interface BreadcrumbProps extends ActionProps<HTMLAnchorElement>, LinkProps {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/components/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Boundary, Classes, Props, removeNonHTMLProps } from "../../common";
import { AbstractPureComponent, Boundary, Classes, type Props, removeNonHTMLProps } from "../../common";
import { Menu } from "../menu/menu";
import { MenuItem } from "../menu/menuItem";
import { OverflowList, OverflowListProps } from "../overflow-list/overflowList";
import { Popover, PopoverProps } from "../popover/popover";
import { Breadcrumb, BreadcrumbProps } from "./breadcrumb";
import { OverflowList, type OverflowListProps } from "../overflow-list/overflowList";
import { Popover, type PopoverProps } from "../popover/popover";
import { Breadcrumb, type BreadcrumbProps } from "./breadcrumb";

export interface BreadcrumbsProps extends Props {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/button/buttonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import classNames from "classnames";
import * as React from "react";

import { Alignment, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props";
import { type Alignment, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props";

export interface ButtonGroupProps extends Props, HTMLDivProps, React.RefAttributes<HTMLDivElement> {
/**
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/components/callout/callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
import classNames from "classnames";
import * as React from "react";

import { Error, IconName, InfoSign, Tick, WarningSign } from "@blueprintjs/icons";
import { Error, type IconName, InfoSign, Tick, WarningSign } from "@blueprintjs/icons";

import {
AbstractPureComponent,
Classes,
DISPLAYNAME_PREFIX,
HTMLDivProps,
type HTMLDivProps,
Intent,
IntentProps,
MaybeElement,
Props,
type IntentProps,
type MaybeElement,
type Props,
Utils,
} from "../../common";
import { H5 } from "../html/html";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/card-list/cardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import classNames from "classnames";
import * as React from "react";

import { Classes, DISPLAYNAME_PREFIX, Elevation, HTMLDivProps, Props } from "../../common";
import { Classes, DISPLAYNAME_PREFIX, Elevation, type HTMLDivProps, type Props } from "../../common";
import { Card } from "../card/card";

export interface CardListProps extends Props, HTMLDivProps, React.RefAttributes<HTMLDivElement> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { Classes, Elevation } from "../../common";
import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props";

export interface CardProps extends Props, HTMLDivProps, React.RefAttributes<HTMLDivElement> {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/collapse/collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type Props } from "../../common/props";

export interface CollapseProps extends Props {
/** Contents to collapse. */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/context-menu/contextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import classNames from "classnames";
import * as React from "react";

import { Classes, DISPLAYNAME_PREFIX, mergeRefs, Props, Utils } from "../../common";
import { Classes, DISPLAYNAME_PREFIX, mergeRefs, type Props, Utils } from "../../common";
import { TooltipContext, TooltipProvider } from "../popover/tooltipContext";
import { ContextMenuPopover } from "./contextMenuPopover";
import type { ContextMenuPopoverOptions, Offset } from "./contextMenuShared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as React from "react";
import * as ReactDOM from "react-dom";

import { Classes } from "../../common";
import { ContextMenuPopover, ContextMenuPopoverProps } from "./contextMenuPopover";
import { ContextMenuPopover, type ContextMenuPopoverProps } from "./contextMenuPopover";

/** DOM element which contains the context menu singleton instance for the imperative ContextMenu APIs. */
let contextMenuElement: HTMLElement | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/control-card/checkboxCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as React from "react";

import { Classes } from "../../common";
import { DISPLAYNAME_PREFIX } from "../../common/props";
import { ControlCard, ControlCardProps } from "./controlCard";
import { ControlCard, type ControlCardProps } from "./controlCard";

export type CheckboxCardProps = Omit<ControlCardProps, "controlKind">;

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/control-card/controlCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import classNames from "classnames";
import * as React from "react";

import { Classes } from "../../common";
import { DISPLAYNAME_PREFIX, HTMLInputProps } from "../../common/props";
import { Card, CardProps } from "../card/card";
import { DISPLAYNAME_PREFIX, type HTMLInputProps } from "../../common/props";
import { Card, type CardProps } from "../card/card";
import type { CheckedControlProps, ControlProps } from "../forms/controlProps";
import { Checkbox, Switch } from "../forms/controls";
import { useCheckedControl } from "./useCheckedControl";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/control-card/switchCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as React from "react";

import { Classes } from "../../common";
import { DISPLAYNAME_PREFIX } from "../../common/props";
import { ControlCard, ControlCardProps } from "./controlCard";
import { ControlCard, type ControlCardProps } from "./controlCard";

export type SwitchCardProps = Omit<ControlCardProps, "controlKind">;

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
import classNames from "classnames";
import * as React from "react";

import { IconName, IconSize, SmallCross } from "@blueprintjs/icons";
import { type IconName, IconSize, SmallCross } from "@blueprintjs/icons";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, MaybeElement, Props } from "../../common";
import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type MaybeElement, type Props } from "../../common";
import * as Errors from "../../common/errors";
import { uniqueId } from "../../common/utils";
import { Button } from "../button/buttons";
import { H6 } from "../html/html";
import { Icon } from "../icon/icon";
import { BackdropProps, Overlay, OverlayableProps } from "../overlay/overlay";
import { type BackdropProps, Overlay, type OverlayableProps } from "../overlay/overlay";

export interface DialogProps extends OverlayableProps, BackdropProps, Props {
/** Dialog contents. */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/dialog/dialogStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props";
import type { DialogStepButtonProps } from "./dialogStepButton";

export type DialogStepId = string | number;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/dialog/dialogStepButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as React from "react";

import type { ButtonSharedPropsAndAttributes } from "../button/buttonProps";
import { AnchorButton } from "../button/buttons";
import { Tooltip, TooltipProps } from "../tooltip/tooltip";
import { Tooltip, type TooltipProps } from "../tooltip/tooltip";

export type DialogStepButtonProps = Partial<ButtonSharedPropsAndAttributes> & {
/** If defined, the button will be wrapped with a tooltip with the specified content. */
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/components/dialog/multistepDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, Position, Utils } from "../../common";
import { AbstractPureComponent, Classes, type Position, Utils } from "../../common";
import { DISPLAYNAME_PREFIX } from "../../common/props";
import { clickElementOnKeyPress } from "../../common/utils";
import { Dialog, DialogProps } from "./dialog";
import { Dialog, type DialogProps } from "./dialog";
import { DialogFooter } from "./dialogFooter";
import { DialogStep, DialogStepId, DialogStepProps } from "./dialogStep";
import { DialogStepButton, DialogStepButtonProps } from "./dialogStepButton";
import { DialogStep, type DialogStepId, type DialogStepProps } from "./dialogStep";
import { DialogStepButton, type DialogStepButtonProps } from "./dialogStepButton";

type DialogStepElement = React.ReactElement<DialogStepProps & { children: React.ReactNode }>;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/divider/divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as React from "react";

import { AbstractPureComponent } from "../../common";
import { DIVIDER } from "../../common/classes";
import { DISPLAYNAME_PREFIX, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type Props } from "../../common/props";

export interface DividerProps extends Props, React.HTMLAttributes<HTMLElement> {
/**
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/components/drawer/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
import classNames from "classnames";
import * as React from "react";

import { IconName, IconSize, SmallCross } from "@blueprintjs/icons";
import { type IconName, IconSize, SmallCross } from "@blueprintjs/icons";

import { AbstractPureComponent, Classes, Props } from "../../common";
import { AbstractPureComponent, Classes, type Props } from "../../common";
import * as Errors from "../../common/errors";
import { getPositionIgnoreAngles, isPositionHorizontal, Position } from "../../common/position";
import { DISPLAYNAME_PREFIX, MaybeElement } from "../../common/props";
import { getPositionIgnoreAngles, isPositionHorizontal, type Position } from "../../common/position";
import { DISPLAYNAME_PREFIX, type MaybeElement } from "../../common/props";
import { Button } from "../button/buttons";
import { H4 } from "../html/html";
import { Icon } from "../icon/icon";
import { BackdropProps, Overlay, OverlayableProps } from "../overlay/overlay";
import { type BackdropProps, Overlay, type OverlayableProps } from "../overlay/overlay";

export enum DrawerSize {
SMALL = "360px",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props";
import { clamp } from "../../common/utils";

export interface EditableTextProps extends IntentProps, Props {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/controlGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { Classes } from "../../common";
import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props";

export interface ControlGroupProps extends Props, HTMLDivProps, React.RefAttributes<HTMLDivElement> {
/** Group contents. */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/fileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes } from "../../common";
import { DISPLAYNAME_PREFIX, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type Props } from "../../common/props";

export interface FileInputProps extends React.LabelHTMLAttributes<HTMLLabelElement>, Props {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/forms/formGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, Intent } from "../../common";
import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props";
import { AbstractPureComponent, Classes, type Intent } from "../../common";
import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props";

export interface FormGroupProps extends IntentProps, Props {
/** Group contents. */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/inputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as React from "react";

import { AbstractPureComponent, Classes } from "../../common";
import * as Errors from "../../common/errors";
import { ControlledProps, DISPLAYNAME_PREFIX, HTMLInputProps, removeNonHTMLProps } from "../../common/props";
import { type ControlledProps, DISPLAYNAME_PREFIX, type HTMLInputProps, removeNonHTMLProps } from "../../common/props";
import { Icon } from "../icon/icon";
import { AsyncControllableInput } from "./asyncControllableInput";
import type { InputSharedProps } from "./inputSharedProps";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/numericInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
AbstractPureComponent,
Classes,
DISPLAYNAME_PREFIX,
HTMLInputProps,
type HTMLInputProps,
Intent,
Position,
refHandler,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/forms/radioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

import * as React from "react";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, OptionProps, Props } from "../../common";
import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type OptionProps, type Props } from "../../common";
import * as Errors from "../../common/errors";
import { isElementOfType } from "../../common/utils";
import { Radio, RadioProps } from "./controls";
import { Radio, type RadioProps } from "./controls";

export interface RadioGroupProps extends Props {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/textArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, refHandler, setRef } from "../../common";
import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props";
import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props";
import { AsyncControllableTextArea } from "./asyncControllableTextArea";

export interface TextAreaProps extends IntentProps, Props, React.TextareaHTMLAttributes<HTMLTextAreaElement> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common";
import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common";
import type { HotkeyConfig } from "../../hooks";
import { KeyComboTag } from "./keyComboTag";

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/hotkeys/hotkeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common";
import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common";
import { HOTKEYS_HOTKEY_CHILDREN } from "../../common/errors";
import { isElementOfType, isReactChildrenElementOrElements } from "../../common/utils";
import { H4 } from "../html/html";
import { Hotkey, HotkeyProps } from "./hotkey";
import { Hotkey, type HotkeyProps } from "./hotkey";

export interface HotkeysProps extends Props {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkeysDialog2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as React from "react";

import { Classes } from "../../common";
import type { HotkeyConfig } from "../../hooks";
import { Dialog, DialogProps } from "../dialog/dialog";
import { Dialog, type DialogProps } from "../dialog/dialog";
import { DialogBody } from "../dialog/dialogBody";
import { Hotkey } from "./hotkey";
import { Hotkeys } from "./hotkeys";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkeysTarget2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as React from "react";

import * as Errors from "../../common/errors";
import { isNodeEnv } from "../../common/utils";
import { HotkeyConfig, useHotkeys, UseHotkeysOptions } from "../../hooks";
import { type HotkeyConfig, useHotkeys, type UseHotkeysOptions } from "../../hooks";

/** Identical to the return type of `useHotkeys` hook. */
export interface HotkeysTarget2RenderProps {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/hotkeys/keyComboTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import classNames from "classnames";
import * as React from "react";

import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common";
import { Icon, IconName } from "../icon/icon";
import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common";
import { Icon, type IconName } from "../icon/icon";
import { normalizeKeyCombo } from "./hotkeyParser";

const KEY_ICONS: Record<string, { icon: IconName; iconTitle: string }> = {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/html-select/htmlSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import classNames from "classnames";
import * as React from "react";

import { CaretDown, DoubleCaretVertical, IconName, SVGIconProps } from "@blueprintjs/icons";
import { CaretDown, DoubleCaretVertical, type IconName, type SVGIconProps } from "@blueprintjs/icons";

import { DISABLED, FILL, HTML_SELECT, LARGE, MINIMAL } from "../../common/classes";
import { DISPLAYNAME_PREFIX, OptionProps } from "../../common/props";
import { DISPLAYNAME_PREFIX, type OptionProps } from "../../common/props";
import type { Extends } from "../../common/utils";

export type HTMLSelectIconName = Extends<IconName, "double-caret-vertical" | "caret-down">;
Expand Down
Loading