From a9a915207cf191dfc6488f5d105abd6a365ec945 Mon Sep 17 00:00:00 2001 From: suzuki Date: Mon, 14 Oct 2019 15:28:33 -0600 Subject: [PATCH] Alphabetize imports Manually alphabetize import groups and lines pending the merging of benmosher/eslint-plugin-import#1360, using WebStorm's Optimize imports --- src/actions/index.ts | 2 +- src/api/index.ts | 2 +- src/containers/NoteOptions.tsx | 8 ++++---- src/reducers/categoryReducer.ts | 2 +- src/reducers/noteReducer.ts | 2 +- src/sagas/index.ts | 12 ++++++------ tests/helpers.tsx | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/actions/index.ts b/src/actions/index.ts index 7d62ac5..eb85dc9 100644 --- a/src/actions/index.ts +++ b/src/actions/index.ts @@ -1,5 +1,5 @@ import { Actions } from 'constants/enums' -import { NoteItem, CategoryItem } from 'types' +import { CategoryItem, NoteItem } from 'types' //============================================================================== // Notes diff --git a/src/api/index.ts b/src/api/index.ts index 6914a9e..0d7482e 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,4 +1,4 @@ -import { NoteItem, CategoryItem } from 'types' +import { CategoryItem, NoteItem } from 'types' export const requestNotes = () => { return new Promise((resolve, reject) => { diff --git a/src/containers/NoteOptions.tsx b/src/containers/NoteOptions.tsx index a927b9f..ffa97dd 100644 --- a/src/containers/NoteOptions.tsx +++ b/src/containers/NoteOptions.tsx @@ -1,11 +1,11 @@ import React from 'react' -import { Dispatch } from 'redux' import { connect } from 'react-redux' +import { Dispatch } from 'redux' import { ArrowUp, Bookmark, Download, Trash } from 'react-feather' -import { toggleTrashedNote, toggleFavoriteNote } from 'actions' -import { NoteItem, ApplicationState } from 'types' -import { getNoteTitle, downloadNote } from 'helpers' +import { toggleFavoriteNote, toggleTrashedNote } from 'actions' +import { downloadNote, getNoteTitle } from 'helpers' +import { ApplicationState, NoteItem } from 'types' export interface NoteOptionsProps { clickedNote: NoteItem diff --git a/src/reducers/categoryReducer.ts b/src/reducers/categoryReducer.ts index 39c2c9e..20f5268 100644 --- a/src/reducers/categoryReducer.ts +++ b/src/reducers/categoryReducer.ts @@ -1,5 +1,5 @@ import { Actions } from 'constants/enums' -import { CategoryState, CategoryActionTypes } from 'types' +import { CategoryActionTypes, CategoryState } from 'types' const initialState: CategoryState = { categories: [], diff --git a/src/reducers/noteReducer.ts b/src/reducers/noteReducer.ts index 6553a4b..a8918fb 100644 --- a/src/reducers/noteReducer.ts +++ b/src/reducers/noteReducer.ts @@ -1,5 +1,5 @@ import { Actions, Folders } from 'constants/enums' -import { NoteItem, NoteState, NotesActionTypes } from 'types' +import { NoteItem, NotesActionTypes, NoteState } from 'types' import { sortByLastUpdated } from 'helpers' const initialState: NoteState = { diff --git a/src/sagas/index.ts b/src/sagas/index.ts index d47c687..ab1359f 100644 --- a/src/sagas/index.ts +++ b/src/sagas/index.ts @@ -1,17 +1,17 @@ // eslint-disable-next-line import/named -import { put, all, takeLatest } from 'redux-saga/effects' +import { all, put, takeLatest } from 'redux-saga/effects' import { Actions } from 'constants/enums' import { - loadNotesSuccess, - loadNotesError, - loadCategoriesSuccess, loadCategoriesError, - syncStateSuccess, + loadCategoriesSuccess, + loadNotesError, + loadNotesSuccess, syncStateError, + syncStateSuccess, } from 'actions' import { SyncStateAction } from 'types' -import { requestNotes, requestCategories, saveState } from 'api' +import { requestCategories, requestNotes, saveState } from 'api' function* fetchNotes() { try { diff --git a/tests/helpers.tsx b/tests/helpers.tsx index c5b9516..952e5f5 100644 --- a/tests/helpers.tsx +++ b/tests/helpers.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from 'react' import { Provider } from 'react-redux' -import { createStore, applyMiddleware, compose } from 'redux' +import { applyMiddleware, compose, createStore } from 'redux' import { createMemoryHistory, MemoryHistory } from 'history' import { MemoryRouter } from 'react-router-dom' import { render } from '@testing-library/react'