From b9cee027581e9aadbcf290398994f9fa1e6d7ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Thu, 16 Jun 2016 22:49:48 -0300 Subject: [PATCH] eslint compliance on reducers & VOs --- src/reducers/auth.js | 6 +++--- src/reducers/config.js | 4 ++-- src/reducers/entries.js | 2 +- src/reducers/entryDraft.js | 2 +- src/valueObjects/MediaProxy.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/reducers/auth.js b/src/reducers/auth.js index 69fbdbff..04776859 100644 --- a/src/reducers/auth.js +++ b/src/reducers/auth.js @@ -4,12 +4,12 @@ import { AUTH_REQUEST, AUTH_SUCCESS, AUTH_FAILURE } from '../actions/auth'; const auth = (state = null, action) => { switch (action.type) { case AUTH_REQUEST: - return Immutable.Map({isFetching: true}); + return Immutable.Map({ isFetching: true }); case AUTH_SUCCESS: - return Immutable.fromJS({user: action.payload}); + return Immutable.fromJS({ user: action.payload }); case AUTH_FAILURE: console.error(action.payload); - return Immutable.Map({error: action.payload.toString()}); + return Immutable.Map({ error: action.payload.toString() }); default: return state; } diff --git a/src/reducers/config.js b/src/reducers/config.js index 135f2af1..088b014c 100644 --- a/src/reducers/config.js +++ b/src/reducers/config.js @@ -4,11 +4,11 @@ import { CONFIG_REQUEST, CONFIG_SUCCESS, CONFIG_FAILURE } from '../actions/confi const config = (state = null, action) => { switch (action.type) { case CONFIG_REQUEST: - return Immutable.Map({isFetching: true}); + return Immutable.Map({ isFetching: true }); case CONFIG_SUCCESS: return Immutable.fromJS(action.payload); case CONFIG_FAILURE: - return Immutable.Map({error: action.payload.toString()}); + return Immutable.Map({ error: action.payload.toString() }); default: return state; } diff --git a/src/reducers/entries.js b/src/reducers/entries.js index ae77ea05..70e73cd2 100644 --- a/src/reducers/entries.js +++ b/src/reducers/entries.js @@ -3,7 +3,7 @@ import { ENTRY_REQUEST, ENTRY_SUCCESS, ENTRIES_REQUEST, ENTRIES_SUCCESS } from '../actions/entries'; -const entries = (state = Map({entities: Map(), pages: Map()}), action) => { +const entries = (state = Map({ entities: Map(), pages: Map() }), action) => { switch (action.type) { case ENTRY_REQUEST: return state.setIn(['entities', `${action.payload.collection}.${action.payload.slug}`, 'isFetching'], true); diff --git a/src/reducers/entryDraft.js b/src/reducers/entryDraft.js index 67c999ff..801f3ea0 100644 --- a/src/reducers/entryDraft.js +++ b/src/reducers/entryDraft.js @@ -2,7 +2,7 @@ import { Map, List } from 'immutable'; import { DRAFT_CREATE, DRAFT_DISCARD, DRAFT_CHANGE } from '../actions/entries'; import { ADD_MEDIA, REMOVE_MEDIA } from '../actions/media'; -const initialState = Map({entry: Map(), mediaFiles: List()}); +const initialState = Map({ entry: Map(), mediaFiles: List() }); const entryDraft = (state = Map(), action) => { switch (action.type) { diff --git a/src/valueObjects/MediaProxy.js b/src/valueObjects/MediaProxy.js index 13e6742c..7fd93ca0 100644 --- a/src/valueObjects/MediaProxy.js +++ b/src/valueObjects/MediaProxy.js @@ -9,6 +9,6 @@ export default function MediaProxy(value, file, uploaded = false) { this.uploaded = uploaded; this.uri = config.media_folder && !uploaded ? config.media_folder + '/' + value : value; this.toString = function() { - return this.uploaded ? this.uri : window.URL.createObjectURL(this.file, {oneTimeOnly: true}); + return this.uploaded ? this.uri : window.URL.createObjectURL(this.file, { oneTimeOnly: true }); }; }