Skip to content

Commit

Permalink
Fix import order by moving 'type' (#2894)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Jan 24, 2024
1 parent fff32e9 commit 92ac295
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
9 changes: 5 additions & 4 deletions src/goals/MergeDuplicates/Redux/tests/MergeDupsDataMock.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import type { PreloadedState } from "@reduxjs/toolkit";
import { Definition, SemanticDomain, Word } from "api/models";
import { type PreloadedState } from "@reduxjs/toolkit";

import { type Definition, type SemanticDomain, type Word } from "api/models";
import { defaultState } from "components/App/DefaultState";
import {
convertSenseToMergeTreeSense,
convertWordToMergeTreeWord,
newMergeTreeWord,
} from "goals/MergeDuplicates/MergeDupsTreeTypes";
import { MergeDupsData } from "goals/MergeDuplicates/MergeDupsTypes";
import { RootState } from "store";
import { type MergeDupsData } from "goals/MergeDuplicates/MergeDupsTypes";
import { type RootState } from "store";
import { newSense, newWord, simpleWord } from "types/word";

const wordsArrayMock = (): Word[] => [
Expand Down
3 changes: 1 addition & 2 deletions src/store.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { configureStore } from "@reduxjs/toolkit";
import { type PreloadedState, configureStore } from "@reduxjs/toolkit";
import { persistStore, persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage";

import type { PreloadedState } from "@reduxjs/toolkit";
import { rootReducer } from "rootReducer";

const persistConfig = { key: "root", storage };
Expand Down
8 changes: 6 additions & 2 deletions src/types/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
import {
type TypedUseSelectorHook,
useDispatch,
useSelector,
} from "react-redux";

import type { RootState, AppDispatch } from "store";
import { type AppDispatch, type RootState } from "store";

// Use throughout your app instead of plain `useDispatch` and `useSelector`
// `useAppDispatch` and `useAppSelector` apply the additional types for TypeScript
Expand Down
10 changes: 4 additions & 6 deletions src/utilities/testUtilities.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { render } from "@testing-library/react";
import { PropsWithChildren, ReactElement } from "react";
import { type PreloadedState } from "@reduxjs/toolkit";
import { type RenderOptions, render } from "@testing-library/react";
import { type PropsWithChildren, type ReactElement } from "react";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";

import type { PreloadedState } from "@reduxjs/toolkit";
import type { RenderOptions } from "@testing-library/react";
import { defaultState } from "components/App/DefaultState";
import { persistor, setupStore } from "store";
import type { AppStore, RootState } from "store";
import { type AppStore, type RootState, persistor, setupStore } from "store";

// These test utilities are leveraged from the Redux documentation for Writing Tests:
// https://redux.js.org/usage/writing-tests
Expand Down

0 comments on commit 92ac295

Please sign in to comment.