Skip to content

Commit

Permalink
chore: use synthetic default imports for react, sinon, moment (#4544)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Feb 25, 2021
1 parent f959561 commit 88638ff
Show file tree
Hide file tree
Showing 353 changed files with 408 additions and 408 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/common/abstractComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { isNodeEnv } from "./utils";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/abstractComponent2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { isNodeEnv } from "./utils";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/abstractPureComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { isNodeEnv } from "./utils";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/abstractPureComponent2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { isNodeEnv } from "./utils";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { IconName } from "@blueprintjs/icons";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/utils/reactUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

/**
* Returns true if `node` is null/undefined, false, empty string, or an array
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, DISPLAYNAME_PREFIX, Intent, IProps, MaybeElement } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";

import * as Classes from "../../common/classes";
import { IActionProps, ILinkProps } from "../../common/props";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Boundary, Classes, IProps, Position, removeNonHTMLProps } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/button/abstractButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";

import {
AbstractPureComponent2,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/button/buttonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Alignment, Classes } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/button/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// HACKHACK: these components should go in separate files
/* eslint-disable max-classes-per-file */

import * as React from "react";
import React from "react";

import { DISPLAYNAME_PREFIX, removeNonHTMLProps } from "../../common/props";
import { IRef, IRefObject, refHandler } from "../../common/refs";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/callout/callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import {
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, Elevation } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";

import { Boundary } from "../../common/boundary";
import * as Classes from "../../common/classes";
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/context-menu/contextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import classNames from "classnames";
import * as React from "react";
import * as ReactDOM from "react-dom";
import React from "react";
import ReactDOM from "react-dom";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, Position } from "../../common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import * as React from "react";
import * as ReactDOM from "react-dom";
import React from "react";
import ReactDOM from "react-dom";

import { IConstructor } from "../../common/constructor";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/dialog/multistepDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, Utils } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2 } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/drawer/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, Keys } from "../../common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { DISPLAYNAME_PREFIX } from "../../common/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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* eslint-disable max-classes-per-file, @typescript-eslint/no-empty-interface */

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Alignment, Classes, IRef, refHandler } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/formGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, IRef } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { IconName } from "@blueprintjs/icons";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/radioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes } from "../../common";
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import {
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 @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, DISPLAYNAME_PREFIX, IProps } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and attach the appropriate key listeners.

```tsx
import { Hotkey, Hotkeys, HotkeysTarget } from "@blueprintjs/core";
import * as React from "react";
import React from "react";

@HotkeysTarget
export class MyComponent extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, DISPLAYNAME_PREFIX } from "../../common";
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/hotkeys/hotkeysDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import classNames from "classnames";
import * as React from "react";
import * as ReactDOM from "react-dom";
import React from "react";
import ReactDOM from "react-dom";

import { Classes } from "../../common";
import { Dialog, IDialogProps } from "../../components";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/hotkeysTarget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as React from "react";
import React from "react";

import { IConstructor } from "../../common/constructor";
import { HOTKEYS_WARN_DECORATOR_NEEDS_REACT_ELEMENT, HOTKEYS_WARN_DECORATOR_NO_METHOD } from "../../common/errors";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/hotkeys/keyCombo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, DISPLAYNAME_PREFIX, IProps } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/html-select/htmlSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2 } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/html-table/htmlTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { AbstractPureComponent2, Classes, IElementRefProps } from "../../common";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/html/html.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";

import { IElementRefProps } from "../../common";
import { BLOCKQUOTE, CODE, CODE_BLOCK, HEADING, LABEL, LIST } from "../../common/classes";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import classNames from "classnames";
import * as React from "react";
import React from "react";
import { polyfill } from "react-lifecycles-compat";

import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons";
Expand Down
Loading

1 comment on commit 88638ff

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chore: use synthetic default imports for react, sinon, moment (#4544)

Previews: documentation | landing | table

Please sign in to comment.