diff --git a/.eslintrc b/.eslintrc index 60611bb..1af12af 100644 --- a/.eslintrc +++ b/.eslintrc @@ -21,6 +21,7 @@ // To give you an idea how to override rule options: "rules": { "quotes": [2, "single"], + "semi": [2, "always"], "strict": [2, "never"], "eol-last": [0], "no-mixed-requires": [0], diff --git a/client/app.js b/client/app.js index 79ca47c..1d99235 100644 --- a/client/app.js +++ b/client/app.js @@ -16,7 +16,7 @@ import { createHistory } from 'history'; import { getOrSetUserId } from './UserId'; import { setupRealtime } from './Realtime'; -import routes from '../universal/routes' +import routes from '../universal/routes'; import pulseApp from '../universal/reducers'; import * as actions from '../universal/actions/PulseActions'; diff --git a/server.js b/server.js index 82902ef..0c45fdb 100644 --- a/server.js +++ b/server.js @@ -7,7 +7,7 @@ import config from 'config'; import * as api from './server/api/http'; import * as eventService from './server/api/service/event'; -import * as uni from './server/app.js' +import * as uni from './server/app.js'; const app = express(); const httpServer = http.createServer(app); @@ -16,7 +16,7 @@ const port = config.get('express.port') || 3000; var io = socketIO(httpServer); app.set('views', path.join(__dirname, 'server', 'views')); -app.set('view engine', 'ejs') +app.set('view engine', 'ejs'); /** * Server middleware diff --git a/server/app.js b/server/app.js index 50b1f93..8a70c2c 100644 --- a/server/app.js +++ b/server/app.js @@ -7,7 +7,7 @@ import { Provider } from 'react-redux'; import * as eventService from './api/service/event'; import pulseApp from '../universal/reducers'; -import routes from '../universal/routes' +import routes from '../universal/routes'; import { routerStateReducer, ReduxRouter } from 'redux-router'; import { reduxReactRouter, match } from 'redux-router/server'; diff --git a/test/actions.test.js b/test/actions.test.js index 61a021b..23d1452 100644 --- a/test/actions.test.js +++ b/test/actions.test.js @@ -15,7 +15,7 @@ import * as types from '../universal/constants/ActionTypes'; describe('Actions', () => { afterEach(function() { - actions.__ResetDependency__('request') + actions.__ResetDependency__('request'); }); /** diff --git a/test/reducers.test.js b/test/reducers.test.js index 8d4c40f..e0c9eee 100644 --- a/test/reducers.test.js +++ b/test/reducers.test.js @@ -23,7 +23,7 @@ describe('Reducers', () => { let userId = 234; let action = actions.setUserId(userId); - expect(initialStateForTest.userId).to.be.null + expect(initialStateForTest.userId).to.be.null; let state = reducer(initialStateForTest, action); expect(state.userId).to.equal(userId); @@ -36,7 +36,7 @@ describe('Reducers', () => { let initialStateForTest = { isWorking: false }; let action = actions.addEventRequest(); - expect(initialStateForTest.isWorking).to.be.false + expect(initialStateForTest.isWorking).to.be.false; let state = reducer(initialStateForTest, action); expect(state.isWorking).to.be.true; @@ -53,7 +53,7 @@ describe('Reducers', () => { let action = actions.addEventSuccess(event); - expect(initialStateForTest.isWorking).to.be.true + expect(initialStateForTest.isWorking).to.be.true; expect(initialStateForTest.events.length).to.equal(events.length); @@ -73,8 +73,8 @@ describe('Reducers', () => { let action = actions.addEventFailure(error); - expect(initialStateForTest.isWorking).to.be.true - expect(initialStateForTest.error).to.be.null + expect(initialStateForTest.isWorking).to.be.true; + expect(initialStateForTest.error).to.be.null; expect(initialStateForTest.events.length).to.equal(events.length); diff --git a/universal/actions/PulseActions.js b/universal/actions/PulseActions.js index e315cad..a6dd1f2 100644 --- a/universal/actions/PulseActions.js +++ b/universal/actions/PulseActions.js @@ -8,7 +8,7 @@ export function setUserId(userId) { return { type: types.SET_USER_ID, userId - } + }; } export function loadEvents() { @@ -24,7 +24,7 @@ export function loadEvents() { dispatch(loadEventsSuccess(res.body)); } }); - } + }; } export function loadEventsRequest() { @@ -63,7 +63,7 @@ export function addEvent(event) { dispatch(addEventSuccess(res.body)); } }); - } + }; } export function addEventRequest(event) { @@ -101,7 +101,7 @@ export function deleteEvent(event) { dispatch(deleteEventSuccess(res.body)); } }); - } + }; } export function deleteEventRequest(event) { @@ -141,7 +141,7 @@ export function editEvent(event) { dispatch(editEventSuccess(res.body)); } }); - } + }; } export function editEventRequest(event) { diff --git a/universal/reducers/pulse.js b/universal/reducers/pulse.js index d46d672..9961cd6 100644 --- a/universal/reducers/pulse.js +++ b/universal/reducers/pulse.js @@ -18,7 +18,7 @@ export default function pulses(state = initialState, action) { case SET_USER_ID: return Object.assign({}, state, { userId: action.userId - }) + }); case ADD_EVENT_REQUEST: return Object.assign({}, state, { isWorking: true,