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

@@ -1,4 +1,4 @@
import { PostActionType } from "constants/postActionType";
import { PostActionType } from 'constants/postActionType'
/**
* Post action interface

View File

@@ -13,7 +13,7 @@ export class PostState {
* @type {*}
* @memberof PostState
*/
userPosts: any = {};
userPosts: any = {}
/**
* If user posts are loaded {true} or not {false}
@@ -21,5 +21,5 @@ export class PostState {
* @type {Boolean}
* @memberof PostState
*/
loaded: Boolean = false;
loaded: Boolean = false
}

View File

@@ -1,3 +1,3 @@
import { postReducer } from "./postReducer";
import { postReducer } from './postReducer'
export {postReducer};
export {postReducer}

View File

@@ -1,15 +1,15 @@
// - Import react components
import moment from 'moment'
import _ from 'lodash'
import {Reducer, Action} from "redux";
import {Reducer, Action} from 'redux'
// - Import action types
import { PostActionType } from "constants/postActionType";
import { PostActionType } from 'constants/postActionType'
import { PostState } from "./PostState";
import { IPostAction } from "./IPostAction";
import { PostState } from './PostState'
import { IPostAction } from './IPostAction'
/**
@@ -17,8 +17,8 @@ import { IPostAction } from "./IPostAction";
* @param {object} state
* @param {object} action
*/
export var postReducer = (state : PostState = new PostState(), action : IPostAction) => {
const { payload } = action;
export let postReducer = (state : PostState = new PostState(), action : IPostAction) => {
const { payload } = action
switch (action.type) {
case PostActionType.CLEAR_ALL_DATA_POST:
return new PostState()
@@ -93,7 +93,7 @@ export var postReducer = (state : PostState = new PostState(), action : IPostAct
}
default:
return state;
return state
}
}