18F/cg-dashboard

View on GitHub
static_src/actions/user_actions.js

Summary

Maintainability
D
1 day
Test Coverage

File user_actions.js has 430 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Actions for user entities. Any actions such as fetching, creating, updating,
 * etc should go here.
 */

Severity: Minor
Found in static_src/actions/user_actions.js - About 6 hrs to fix

    userActions has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    const userActions = {
      fetchOrgUsers(orgGuid) {
        AppDispatcher.handleViewAction({
          type: userActionTypes.ORG_USERS_FETCH,
          orgGuid
    Severity: Minor
    Found in static_src/actions/user_actions.js - About 5 hrs to fix

      Function createUserAndAssociate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        createUserAndAssociate(userGuid) {
          const entityType = UserStore.currentlyViewedType;
          const orgGuid = OrgStore.currentOrgGuid;
          let cfApiRequest;
          let entityGuid;
      Severity: Minor
      Found in static_src/actions/user_actions.js - About 1 hr to fix

        Function deleteUserRoles has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          deleteUserRoles(roles, apiKey, userGuid, entityGuid, entityType) {
        Severity: Minor
        Found in static_src/actions/user_actions.js - About 35 mins to fix

          Function addUserRoles has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            addUserRoles(role, resource, userGuid, entityGuid, entityType) {
          Severity: Minor
          Found in static_src/actions/user_actions.js - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status