JSHint will report:
Regular parameters should not come after default parameters. W138
Well, we don鈥檛 agree with this particular rule. You can either disable it, or not use optional parameters and write something like
function counter(state, action) {
if (typeof state === 'undefined') {
return 0
}
switch (action.type) {
// ...
}
}
Most helpful comment
Well, we don鈥檛 agree with this particular rule. You can either disable it, or not use optional parameters and write something like