Skip to content

Commit

Permalink
Add Eslint rule for semi colons and then correct errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GordyD committed Jan 24, 2016
1 parent 3ac32ac commit 79c767d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as types from '../universal/constants/ActionTypes';

describe('Actions', () => {
afterEach(function() {
actions.__ResetDependency__('request')
actions.__ResetDependency__('request');
});

/**
Expand Down
10 changes: 5 additions & 5 deletions test/reducers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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);


Expand All @@ -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);


Expand Down
10 changes: 5 additions & 5 deletions universal/actions/PulseActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function setUserId(userId) {
return {
type: types.SET_USER_ID,
userId
}
};
}

export function loadEvents() {
Expand All @@ -24,7 +24,7 @@ export function loadEvents() {
dispatch(loadEventsSuccess(res.body));
}
});
}
};
}

export function loadEventsRequest() {
Expand Down Expand Up @@ -63,7 +63,7 @@ export function addEvent(event) {
dispatch(addEventSuccess(res.body));
}
});
}
};
}

export function addEventRequest(event) {
Expand Down Expand Up @@ -101,7 +101,7 @@ export function deleteEvent(event) {
dispatch(deleteEventSuccess(res.body));
}
});
}
};
}

export function deleteEventRequest(event) {
Expand Down Expand Up @@ -141,7 +141,7 @@ export function editEvent(event) {
dispatch(editEventSuccess(res.body));
}
});
}
};
}

export function editEventRequest(event) {
Expand Down
2 changes: 1 addition & 1 deletion universal/reducers/pulse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 79c767d

Please sign in to comment.