GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (34)

src/util/handleActions.js (1 issue)

Severity
1
const TYPE_ERROR = 'handleActions: Action Types should be not be undefined';
2
const ACTION_ERROR = 'handleActions: action object should be not be undefined';
3
4
export const handleActions = (map, initialState) => {
0 ignored issues
show
The parameter initialState is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
5
    Object.keys(map).forEach(key => {
6
        if (key === 'undefined') {
7
            throw new Error(TYPE_ERROR);
8
        }
9
    });
10
11
    return (state = initialState, action) => {
12
        if (!action) {
13
            throw new Error(ACTION_ERROR);
14
        }
15
16
        if (action.type === undefined) {
17
            throw new Error(TYPE_ERROR);
18
        }
19
20
        const reducerSubFunction = map[action.type];
21
22
        if (typeof reducerSubFunction === 'function') {
23
            return reducerSubFunction(state, action);
24
        }
25
26
        return state;
27
    };
28
};
29
30
export default handleActions;
31