Improvment in tslint standard (#16)

This commit is contained in:
Qolzam
2017-10-10 16:39:02 +07:00
parent 181d2b8abd
commit 1937742f04
160 changed files with 984 additions and 1019 deletions

View File

@@ -3,23 +3,23 @@ import moment from 'moment'
import _ from 'lodash'
// - Import domain
import { User } from "domain/users";
import { Comment } from "domain/comments";
import { User } from 'domain/users'
import { Comment } from 'domain/comments'
// - Import action types
import {CommentActionType} from 'constants/commentActionType'
import { CommentState } from "./CommentState";
import { ICommentAction } from "./ICommentAction";
import { CommentState } from './CommentState'
import { ICommentAction } from './ICommentAction'
/**
* Comment reducer
* @param state
* @param action
*/
export var commentReducer = (state: CommentState = new CommentState(), action: ICommentAction) => {
var { payload } = action
export let commentReducer = (state: CommentState = new CommentState(), action: ICommentAction) => {
let { payload } = action
switch (action.type) {
/* _____________ CRUD _____________ */
@@ -62,7 +62,7 @@ export var commentReducer = (state: CommentState = new CommentState(), action: I
}
}
case CommentActionType.DELETE_COMMENT:
var parsedComments = {}
let parsedComments = {}
if (!state.postComments![payload.postId]) {
return state
}
@@ -111,11 +111,11 @@ export var commentReducer = (state: CommentState = new CommentState(), action: I
}
case CommentActionType.CLEAR_ALL_DATA_COMMENT:
return new CommentState();
return new CommentState()
default:
return state;
return state
}