Skip to content

Commit 36c9a20

Browse files
committed
eslint --fix
1 parent 6485ed9 commit 36c9a20

File tree

8 files changed

+22
-23
lines changed

8 files changed

+22
-23
lines changed

services/app/assets/js/widgets/config/gameStatusCodes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ export default {
44
playing: 'playing',
55
gameOver: 'game_over',
66
};
7-

services/app/assets/js/widgets/middlewares/Chat.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import socket from '../../socket';
21
import Gon from 'gon';
3-
import { userJoinedChat, userLeftChat, fetchChatData, newMessageChat } from '../actions';
2+
import socket from '../../socket';
3+
import {
4+
userJoinedChat, userLeftChat, fetchChatData, newMessageChat,
5+
} from '../actions';
46

57
const chatId = Gon.getAsset('game_id');
68
const channelName = `chat:${chatId}`;

services/app/assets/js/widgets/middlewares/Lobby.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import socket from '../../socket';
2-
import { cancelGameLobby, fetchGameList, newGameLobby, updateGameLobby } from '../actions';
2+
import {
3+
cancelGameLobby, fetchGameList, newGameLobby, updateGameLobby,
4+
} from '../actions';
35

46
const channelName = 'lobby';
57
const channel = socket.channel(channelName);

services/app/assets/js/widgets/reducers/editor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ export default handleActions({
1818
};
1919
},
2020
}, initialState);
21-
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { combineReducers } from 'redux';
2-
import chat from '../reducers/chat';
3-
import gameList from '../reducers/gameList';
4-
import storeLoaded from '../reducers/store';
5-
import user from '../reducers/user';
6-
import executionOutput from '../reducers/executionOutput';
7-
import editors from '../reducers/editor';
8-
import game from '../reducers/game';
2+
import chat from './chat';
3+
import gameList from './gameList';
4+
import storeLoaded from './store';
5+
import user from './user';
6+
import executionOutput from './executionOutput';
7+
import editors from './editor';
8+
import game from './game';
99

1010
export default combineReducers({
1111
game,
@@ -16,4 +16,3 @@ export default combineReducers({
1616
storeLoaded,
1717
executionOutput,
1818
});
19-

services/app/assets/js/widgets/reducers/store.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ const storeLoaded = handleActions({
1010
}, initialState);
1111

1212
export default storeLoaded;
13-

services/app/assets/js/widgets/reducers/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const reducer = handleActions({
2525
},
2626

2727
[actions.updateUsers](state, { payload }) {
28-
const { users: usersList } = payload;
28+
const { users: usersList } = payload;
2929
const users = _.reduce(usersList, (acc, user) => ({ ...acc, [user.id]: user }), {});
3030
if (!_.isEmpty(users)) {
3131
return { ...state, users: { ...state.users, ...users } };

services/app/assets/js/widgets/selectors/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,21 @@ export const secondEditorSelector = (state) => {
5050

5151
export const leftEditorSelector = (state) => {
5252
const currentUser = currentUserSelector(state);
53-
const editorSelector = (currentUser.type !== userTypes.secondPlayer) ?
54-
firstEditorSelector :
55-
secondEditorSelector;
53+
const editorSelector = (currentUser.type !== userTypes.secondPlayer)
54+
? firstEditorSelector
55+
: secondEditorSelector;
5656
return editorSelector(state);
5757
};
5858

5959
export const rightEditorSelector = (state) => {
6060
const currentUser = currentUserSelector(state);
61-
const editorSelector = (currentUser.type === userTypes.secondPlayer) ?
62-
firstEditorSelector :
63-
secondEditorSelector;
61+
const editorSelector = (currentUser.type === userTypes.secondPlayer)
62+
? firstEditorSelector
63+
: secondEditorSelector;
6464
return editorSelector(state);
6565
};
6666

67-
export const langSelector = (userId, state) =>
68-
_.get(editorsSelector(state), [userId, 'currentLang'], null);
67+
export const langSelector = (userId, state) => _.get(editorsSelector(state), [userId, 'currentLang'], null);
6968

7069
export const gameStatusSelector = state => state.game.gameStatus;
7170

0 commit comments

Comments
 (0)