Skip to content

Commit 9fb581c

Browse files
c0dedancekassens
andauthored
Refactor: merge duplicate imports (#25489)
Co-authored-by: Jan Kassens <[email protected]>
1 parent bc35836 commit 9fb581c

30 files changed

+78
-78
lines changed

packages/react-devtools-shared/src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ import {
4141
LOCAL_STORAGE_SHOW_INLINE_WARNINGS_AND_ERRORS_KEY,
4242
LOCAL_STORAGE_HIDE_CONSOLE_LOGS_IN_STRICT_MODE,
4343
} from './constants';
44-
import {ElementTypeRoot} from 'react-devtools-shared/src/types';
4544
import {ComponentFilterElementType, ElementTypeHostComponent} from './types';
4645
import {
46+
ElementTypeRoot,
4747
ElementTypeClass,
4848
ElementTypeForwardRef,
4949
ElementTypeFunction,

packages/react-devtools-timeline/src/TimelineContext.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import type {ReactContext} from 'shared/ReactTypes';
10+
import type {ReactContext, RefObject} from 'shared/ReactTypes';
1111

1212
import * as React from 'react';
1313
import {
@@ -27,7 +27,6 @@ import type {
2727
ViewState,
2828
ReactEventInfo,
2929
} from './types';
30-
import type {RefObject} from 'shared/ReactTypes';
3130

3231
export type Context = {
3332
file: File | null,

packages/react-devtools-timeline/src/view-base/HorizontalPanAndZoomView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import type {Size, IntrinsicSize} from './geometry';
10+
import type {Size, IntrinsicSize, Rect} from './geometry';
1111
import type {
1212
Interaction,
1313
MouseDownInteraction,
@@ -16,7 +16,6 @@ import type {
1616
WheelPlainInteraction,
1717
WheelWithShiftInteraction,
1818
} from './useCanvasInteraction';
19-
import type {Rect} from './geometry';
2019
import type {ScrollState} from './utils/scrollState';
2120
import type {ViewRefs} from './Surface';
2221
import type {ViewState} from '../types';

packages/react-devtools-timeline/src/view-base/VerticalScrollView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
* @flow
88
*/
99

10-
import type {Size, IntrinsicSize} from './geometry';
10+
import type {Size, IntrinsicSize, Rect} from './geometry';
1111
import type {
1212
Interaction,
1313
MouseDownInteraction,
1414
MouseMoveInteraction,
1515
MouseUpInteraction,
1616
WheelWithShiftInteraction,
1717
} from './useCanvasInteraction';
18-
import type {Rect} from './geometry';
1918
import type {ScrollState} from './utils/scrollState';
2019
import type {ViewRefs} from './Surface';
2120
import type {ViewState} from '../types';

packages/react-devtools-timeline/src/view-base/vertical-scroll-overflow/VerticalScrollBarView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* @flow
88
*/
99

10-
import type {Interaction} from '../useCanvasInteraction';
1110
import type {Rect} from '../geometry';
1211
import type {Surface, ViewRefs} from '../Surface';
1312
import type {
13+
Interaction,
1414
ClickInteraction,
1515
MouseDownInteraction,
1616
MouseMoveInteraction,

packages/react-dom-bindings/src/client/ReactDOMHostConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import {
2424
getFiberFromScopeInstance,
2525
getInstanceFromNode as getInstanceFromNodeDOMTree,
2626
isContainerMarkedAsRoot,
27+
detachDeletedInstance,
2728
} from './ReactDOMComponentTree';
28-
import {detachDeletedInstance} from './ReactDOMComponentTree';
2929
export {detachDeletedInstance};
3030
import {hasRole} from './DOMAccessibilityRoles';
3131
import {

packages/react-dom-bindings/src/events/DOMPluginEventSystem.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
*/
99

1010
import type {DOMEventName} from './DOMEventNames';
11-
import {
12-
type EventSystemFlags,
13-
SHOULD_NOT_DEFER_CLICK_FOR_FB_SUPPORT_MODE,
14-
IS_LEGACY_FB_SUPPORT_MODE,
15-
SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS,
16-
} from './EventSystemFlags';
11+
import type {EventSystemFlags} from './EventSystemFlags';
1712
import type {AnyNativeEvent} from './PluginModuleType';
1813
import type {
1914
KnownReactSyntheticEvent,
@@ -23,6 +18,9 @@ import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
2318

2419
import {allNativeEvents} from './EventRegistry';
2520
import {
21+
SHOULD_NOT_DEFER_CLICK_FOR_FB_SUPPORT_MODE,
22+
IS_LEGACY_FB_SUPPORT_MODE,
23+
SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS,
2624
IS_CAPTURE_PHASE,
2725
IS_EVENT_HANDLE_NON_MANAGED_NODE,
2826
IS_NON_DELEGATED,
@@ -45,7 +43,7 @@ import {
4543
getEventListenerSet,
4644
getEventHandlerListeners,
4745
} from '../client/ReactDOMComponentTree';
48-
import {COMMENT_NODE} from '../shared/HTMLNodeType';
46+
import {COMMENT_NODE, DOCUMENT_NODE} from '../shared/HTMLNodeType';
4947
import {batchedUpdates} from './ReactDOMUpdateBatching';
5048
import getListener from './getListener';
5149
import {passiveBrowserEventsSupported} from './checkPassiveEvents';
@@ -61,7 +59,6 @@ import {
6159
invokeGuardedCallbackAndCatchFirstError,
6260
rethrowCaughtError,
6361
} from 'shared/ReactErrorUtils';
64-
import {DOCUMENT_NODE} from '../shared/HTMLNodeType';
6562
import {createEventListenerWrapperWithPriority} from './ReactDOMEventListener';
6663
import {
6764
removeEventListener,

packages/react-dom-bindings/src/events/plugins/SimpleEventPlugin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ import {
4343
accumulateSinglePhaseListeners,
4444
accumulateEventHandleNonManagedNodeListeners,
4545
} from '../DOMPluginEventSystem';
46-
import {IS_EVENT_HANDLE_NON_MANAGED_NODE} from '../EventSystemFlags';
46+
import {
47+
IS_EVENT_HANDLE_NON_MANAGED_NODE,
48+
IS_CAPTURE_PHASE,
49+
} from '../EventSystemFlags';
4750

4851
import getEventCharCode from '../getEventCharCode';
49-
import {IS_CAPTURE_PHASE} from '../EventSystemFlags';
5052

5153
import {enableCreateEventHandleAPI} from 'shared/ReactFeatureFlags';
5254

packages/react-dom/src/client/ReactDOMRoot.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ const {Dispatcher} = ReactDOMSharedInternals;
1818
import {ReactDOMClientDispatcher} from 'react-dom-bindings/src/client/ReactDOMFloatClient';
1919
import {queueExplicitHydrationTarget} from 'react-dom-bindings/src/events/ReactDOMEventReplaying';
2020
import {REACT_ELEMENT_TYPE} from 'shared/ReactSymbols';
21-
import {enableFloat, enableHostSingletons} from 'shared/ReactFeatureFlags';
21+
import {
22+
enableFloat,
23+
enableHostSingletons,
24+
allowConcurrentByDefault,
25+
disableCommentsAsDOMContainers,
26+
} from 'shared/ReactFeatureFlags';
2227

2328
export type RootType = {
2429
render(children: ReactNodeList): void,
@@ -73,10 +78,6 @@ import {
7378
isAlreadyRendering,
7479
} from 'react-reconciler/src/ReactFiberReconciler';
7580
import {ConcurrentRoot} from 'react-reconciler/src/ReactRootTags';
76-
import {
77-
allowConcurrentByDefault,
78-
disableCommentsAsDOMContainers,
79-
} from 'shared/ReactFeatureFlags';
8081

8182
/* global reportError */
8283
const defaultOnRecoverableError =

packages/react-dom/src/test-utils/ReactTestUtils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ import {
2323
rethrowCaughtError,
2424
invokeGuardedCallbackAndCatchFirstError,
2525
} from 'shared/ReactErrorUtils';
26-
import {enableFloat} from 'shared/ReactFeatureFlags';
26+
import {enableFloat, enableHostSingletons} from 'shared/ReactFeatureFlags';
2727
import assign from 'shared/assign';
2828
import isArray from 'shared/isArray';
29-
import {enableHostSingletons} from 'shared/ReactFeatureFlags';
3029

3130
// Keep in sync with ReactDOM.js:
3231
const SecretInternals =

0 commit comments

Comments
 (0)