Skip to content

Commit

Permalink
Upgrading dependencies, making ESLint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin committed Apr 30, 2016
1 parent ac0dbe5 commit e7838ac
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 58 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Expand Up @@ -3,3 +3,4 @@ assets/
persist/
stats/
.git/
coverage/
6 changes: 6 additions & 0 deletions .eslintrc
Expand Up @@ -6,6 +6,12 @@
],
"rules": {
"indent": ["error", 4],
"react/jsx-indent": ["error", 4],
"react/jsx-first-prop-new-line": 0,
"jsx-a11y/aria-role": 0,
"jsx-a11y/img-has-alt": 0,
"jsx-a11y/img-redundant-alt": 0,
"react/jsx-curly-spacing": 0,
"no-console": 0,
"no-param-reassign": 0,
"comma-dangle": ["error", "never"],
Expand Down
2 changes: 2 additions & 0 deletions app/Component.jsx
@@ -1,3 +1,5 @@
/* eslint react/require-render-return: 0 */

import React, { Component } from 'react';
import shallowCompare from 'react-addons-shallow-compare';

Expand Down
8 changes: 4 additions & 4 deletions app/components/Post.jsx
Expand Up @@ -21,11 +21,11 @@ class Post extends Component {
if (this.props.currentUser === post.user) {
return (
<Button
icon={icons.delete_forever}
label={strings.deleteButton}
icon={ icons.delete_forever }
label={ strings.deleteButton }
raised
className={style.deleteButton}
onClick={() => this.props.onDelete(post)}
className={ style.deleteButton }
onClick={ () => this.props.onDelete(post) }
/>
);
}
Expand Down
11 changes: 6 additions & 5 deletions app/index.jsx
@@ -1,4 +1,5 @@
/* global __DEVTOOLS__ __USE_GA__ __GA_ID__ */
/* eslint global-require:0 */
import React from 'react';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
Expand Down Expand Up @@ -26,8 +27,8 @@ class Index extends React.Component {
return (
<Router history={history}>
<Route path="/" component={App}>
<IndexRoute component={Join} />
<Route path="session/:sessionId" component={Main} />
<IndexRoute component={Join} />
<Route path="session/:sessionId" component={Main} />
</Route>
</Router>
);
Expand All @@ -42,8 +43,8 @@ class Index extends React.Component {
<div>
<Provider store={store}>
<div>
{ this.renderRoutes() }
<DevTools />
{this.renderRoutes()}
<DevTools />
</div>
</Provider>
</div>
Expand All @@ -52,7 +53,7 @@ class Index extends React.Component {
component = (
<div>
<Provider store={store}>
{ this.renderRoutes() }
{this.renderRoutes()}
</Provider>
</div>
);
Expand Down
12 changes: 6 additions & 6 deletions app/pages/DevTools.jsx
Expand Up @@ -4,10 +4,10 @@ import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';

export default createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-q"
changeMonitorKey="ctrl-m"
>
<LogMonitor />
</DockMonitor>
<DockMonitor toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-q"
changeMonitorKey="ctrl-m"
>
<LogMonitor />
</DockMonitor>
);
12 changes: 6 additions & 6 deletions app/pages/Main.jsx
Expand Up @@ -51,19 +51,19 @@ class Main extends Component {
};
return (
<div>
<div style={{ width: '100%', textAlign: 'center' }}>
<div style={ { width: '100%', textAlign: 'center' } }>
<SessionName />
</div>
{ summaryMode ? <SummaryBoard /> : <PostBoard /> }
<Snackbar
action="Ok!"
icon={ icons.question_answer }
label={strings.hint}
label={ strings.hint }
type="accept"
active={this.state.snackBarActive}
timeout={10000}
onClick={hideSnackbar}
onTimeout={hideSnackbar}
active={ this.state.snackBarActive }
timeout={ 10000 }
onClick={ hideSnackbar }
onTimeout={ hideSnackbar }
/>
</div>
);
Expand Down
30 changes: 15 additions & 15 deletions app/sagas/index.js
Expand Up @@ -19,18 +19,18 @@ import {
import { addPost, like } from './posts';
import { autoJoinUser, createSession, renameCurrentSessionInLocalStorage } from './session';

const watchers = [
function* () { yield* takeEvery(AUTO_LOGIN, autoLoginUser); },
function* () { yield* takeEvery(AUTO_JOIN, autoJoinUser); },
function* () { yield* takeEvery(RECEIVE_SESSION_NAME, renameCurrentSessionInLocalStorage); },
function* () { yield* takeEvery(RENAME_SESSION, renameCurrentSessionInLocalStorage); },
function* () { yield* takeEvery(LOGIN, loginUser); },
function* () { yield* takeEvery(LOGOUT, deleteUserFromLocalStorage); },
function* () { yield* takeEvery(CHANGE_LANGUAGE, storeLanguageToLocalStorage); },
function* () { yield* takeEvery(LEAVE_SESSION, disconnectUser); },
function* () { yield* takeEvery(ADD_POST, addPost); },
function* () { yield* takeEvery(CREATE_SESSION, createSession); },
function* () { yield* takeEvery(LIKE, like); }
];

export default watchers;
export default function* rootSaga() {
yield [
takeEvery(AUTO_LOGIN, autoLoginUser),
takeEvery(AUTO_JOIN, autoJoinUser),
takeEvery(RECEIVE_SESSION_NAME, renameCurrentSessionInLocalStorage),
takeEvery(RENAME_SESSION, renameCurrentSessionInLocalStorage),
takeEvery(LOGIN, loginUser),
takeEvery(LOGOUT, deleteUserFromLocalStorage),
takeEvery(CHANGE_LANGUAGE, storeLanguageToLocalStorage),
takeEvery(LEAVE_SESSION, disconnectUser),
takeEvery(ADD_POST, addPost),
takeEvery(CREATE_SESSION, createSession),
takeEvery(LIKE, like)
];
}
5 changes: 4 additions & 1 deletion app/store/configureStore.js
@@ -1,4 +1,5 @@
/* global __DEVELOPMENT__ __USE_GA__ __DEVTOOLS__ */
/* eslint global-require: 0 */

import { compose, createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
Expand All @@ -11,10 +12,11 @@ import createSagaMiddleware from 'redux-saga';

export default function configureStore(initialState = {}, browserHistory) {
const middlewares = [];
const sagaMiddleware = createSagaMiddleware();
middlewares.push(thunk);
middlewares.push(routerMiddleware(browserHistory));
middlewares.push(socketIoMiddleware);
middlewares.push(createSagaMiddleware(...sagas));
middlewares.push(sagaMiddleware);

if (__DEVELOPMENT__) {
const createLogger = require('redux-logger');
Expand All @@ -40,6 +42,7 @@ export default function configureStore(initialState = {}, browserHistory) {

const finalCreateStore = createStoreWithMiddleware(createStore);
const store = finalCreateStore(reducers, initialState);
sagaMiddleware.run(sagas);

if (__DEVELOPMENT__) {
if (module.hot) {
Expand Down
2 changes: 2 additions & 0 deletions config/index.js
@@ -1,3 +1,5 @@
/* eslint global-require: 0 */

const fs = require('fs');
const path = require('path');

Expand Down
39 changes: 20 additions & 19 deletions package.json
Expand Up @@ -11,7 +11,7 @@
"autoprefixer": "6.3.6",
"babel-cli": "6.7.7",
"babel-core": "6.7.7",
"babel-eslint": "6.0.3",
"babel-eslint": "6.0.4",
"babel-loader": "6.2.4",
"babel-plugin-react-transform": "2.0.2",
"babel-plugin-transform-decorators-legacy": "1.3.4",
Expand All @@ -22,51 +22,52 @@
"babel-preset-react-hmre": "1.1.1",
"babel-preset-stage-0": "6.5.0",
"chalk": "1.1.3",
"classnames": "2.2.3",
"classnames": "2.2.4",
"cross-env": "1.0.7",
"css-loader": "0.23.1",
"eslint": "2.8.0",
"eslint-config-airbnb": "7.0.0",
"eslint": "2.9.0",
"eslint-config-airbnb": "8.0.0",
"eslint-loader": "1.3.0",
"eslint-plugin-jsx-a11y": "0.6.2",
"eslint-plugin-react": "4.3.0",
"eslint-plugin-import": "^1.6.1",
"eslint-plugin-jsx-a11y": "1.0.4",
"eslint-plugin-react": "5.0.1",
"express": "4.13.4",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.8.5",
"history": "2.1.0",
"history": "2.1.1",
"html-webpack-plugin": "2.16.0",
"json-loader": "0.5.4",
"local-storage": "1.4.2",
"lodash": "4.11.1",
"md5": "2.1.0",
"moment": "2.13.0",
"mongoose": "4.4.12",
"mongoose": "4.4.14",
"nedb": "1.8.0",
"node-emoji": "1.3.0",
"node-sass": "3.4.2",
"node-uuid": "1.4.7",
"nodemon": "1.9.1",
"nodemon": "1.9.2",
"normalize.css": "4.1.1",
"postcss-loader": "0.8.2",
"react": "15.0.1",
"react-addons-css-transition-group": "15.0.1",
"react-addons-shallow-compare": "15.0.1",
"react-dom": "15.0.1",
"react-ga": "^1.3.3",
"postcss-loader": "0.9.1",
"react": "15.0.2",
"react-addons-css-transition-group": "15.0.2",
"react-addons-shallow-compare": "15.0.2",
"react-dom": "15.0.2",
"react-ga": "1.4.1",
"react-redux": "4.4.5",
"react-router": "2.3.0",
"react-router-redux": "4.0.2",
"react-router": "2.4.0",
"react-router-redux": "4.0.4",
"react-toolbox": "0.16.2",
"react-tools": "0.13.3",
"react-transform": "0.0.3",
"react-transform-hmr": "1.0.4",
"redux": "3.5.1",
"redux": "3.5.2",
"redux-actions": "0.9.1",
"redux-devtools": "3.2.0",
"redux-devtools-dock-monitor": "1.1.1",
"redux-devtools-log-monitor": "1.0.11",
"redux-logger": "2.6.1",
"redux-saga": "0.9.5",
"redux-saga": "0.10.1",
"redux-thunk": "2.0.1",
"reselect": "2.5.1",
"sass-loader": "3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion server/index.js
Expand Up @@ -133,7 +133,7 @@ db().then(store => {
const ip = socket.request.connection.remoteAddress;
antiSpam(ip, () => {
console.log(d() + b(' Connection: ') +
r('New user connected'), gr(socket.id));
r('New user connected'), gr(socket.id), gr(ip));

const actions = [
{ type: 'ADD_POST_SUCCESS', handler: receivePost },
Expand Down
3 changes: 2 additions & 1 deletion server/migrate2to3.js
@@ -1,7 +1,8 @@
/* eslint no-underscore-dangle: 0 */

import fs from 'fs';
import path from 'path';


export default store => {
console.log('migrating');
const file = path.resolve(__dirname, '..', 'persist', 'sessions');
Expand Down
1 change: 1 addition & 0 deletions ui.jsx
@@ -1,3 +1,4 @@
/* eslint import/no-unresolved: 0 */
import 'babel-polyfill';
import Index from './app/index';
import ReactDOM from 'react-dom';
Expand Down

0 comments on commit e7838ac

Please sign in to comment.