adam-26/react-router-dispatcher

View on GitHub
src/dispatchRouteActions.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function resolveActionSets has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Confirmed

export function resolveActionSets(routeComponents, dispatchActions, initParamFuncName, isLifecycleMethod, actionFilter) {
    const actionSets = parseDispatchActions(dispatchActions);
    const resolvedActionSets = [];

    actionSets.forEach(actionSet => {
Severity: Minor
Found in src/dispatchRouteActions.js - About 1 hr to fix

    Function dispatchClientActions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

    export function dispatchClientActions(location, actionNames, routeConfig, props) {
        const { routes, routeComponentPropNames } = routeConfig;
    
        const actionParams = Object.assign({}, defaultParams); // used for internal action parameters
        const clientActionSets = standardizeActionNames(actionNames);
    Severity: Minor
    Found in src/dispatchRouteActions.js - About 1 hr to fix

      Function createActionSetPromise has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Wontfix

      function createActionSetPromise(resolvedActionSet, location, actionParams, props) {
          const {
              routeActions,
              actionSuccessHandler,
              actionErrorHandler,
      Severity: Minor
      Found in src/dispatchRouteActions.js - About 1 hr to fix

        Function dispatchRouteActions has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Wontfix

        export function dispatchRouteActions(location, actions, routeConfig, props, initParamFuncName, isLifecycleMethod, actionFilter) {
        Severity: Major
        Found in src/dispatchRouteActions.js - About 50 mins to fix

          Function addRouteComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Wontfix

          function addRouteComponent(component, match, route, routeComponentKey, target) {
          Severity: Minor
          Found in src/dispatchRouteActions.js - About 35 mins to fix

            Function resolveActionSets has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Confirmed

            export function resolveActionSets(routeComponents, dispatchActions, initParamFuncName, isLifecycleMethod, actionFilter) {
            Severity: Minor
            Found in src/dispatchRouteActions.js - About 35 mins to fix

              TODO found
              Confirmed

              // TODO: Remove the need for any default parameters
              Severity: Minor
              Found in src/dispatchRouteActions.js by fixme

              There are no issues that match your filters.

              Category
              Status