summaryrefslogtreecommitdiff
path: root/frontend/src/store.js
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-05-21 20:20:45 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2017-05-22 00:23:02 +0200
commitc03e68041e0f444e18a895058afbdf0d68759517 (patch)
tree6e31f9726d36e746f43c7856cebff8c861577e31 /frontend/src/store.js
parentClean name in websocket.js (diff)
downloadseven-wonders-c03e68041e0f444e18a895058afbdf0d68759517.tar.gz
seven-wonders-c03e68041e0f444e18a895058afbdf0d68759517.tar.bz2
seven-wonders-c03e68041e0f444e18a895058afbdf0d68759517.zip
Update prettier config and reformat
Here's the discussion summary: - single quote, because that's what I'm used to in the JS world - trailing comma, to avoid unnecessary git changes - print-width 120, because 120 still doesn't require to scroll horizontally, and vertical space is precious
Diffstat (limited to 'frontend/src/store.js')
-rw-r--r--frontend/src/store.js30
1 files changed, 13 insertions, 17 deletions
diff --git a/frontend/src/store.js b/frontend/src/store.js
index ef9038eb..4bd22184 100644
--- a/frontend/src/store.js
+++ b/frontend/src/store.js
@@ -1,12 +1,12 @@
-import { createStore, applyMiddleware, compose } from "redux";
-import { browserHistory } from "react-router";
-import { syncHistoryWithStore, routerMiddleware } from "react-router-redux";
-import Immutable from "seamless-immutable";
+import { createStore, applyMiddleware, compose } from 'redux';
+import { browserHistory } from 'react-router';
+import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux';
+import Immutable from 'seamless-immutable';
-import createReducer from "./reducers";
-import createSagaMiddleware from "redux-saga";
-import rootSaga from "./sagas";
-import { makeSelectLocationState } from "./redux/app";
+import createReducer from './reducers';
+import createSagaMiddleware from 'redux-saga';
+import rootSaga from './sagas';
+import { makeSelectLocationState } from './redux/app';
export default function configureStore(initialState = {}) {
const sagaMiddleware = createSagaMiddleware();
@@ -15,24 +15,20 @@ export default function configureStore(initialState = {}) {
const enhancers = [applyMiddleware(...middlewares)];
- const composeEnhancers = process.env.NODE_ENV !== "production" &&
- typeof window === "object" &&
+ const composeEnhancers = process.env.NODE_ENV !== 'production' &&
+ typeof window === 'object' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
: compose;
- const store = createStore(
- createReducer(),
- Immutable.from(initialState),
- composeEnhancers(...enhancers)
- );
+ const store = createStore(createReducer(), Immutable.from(initialState), composeEnhancers(...enhancers));
sagaMiddleware.run(rootSaga, browserHistory);
return {
store,
history: syncHistoryWithStore(browserHistory, store, {
- selectLocationState: makeSelectLocationState()
- })
+ selectLocationState: makeSelectLocationState(),
+ }),
};
}
bgstack15