department-of-veterans-affairs/vets-website

View on GitHub
src/applications/third-party-app-directory/reducers/index.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function thirdPartyAppsReducer has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const thirdPartyAppsReducer = (state = initialState, action) => {
  switch (action.type) {
    case FETCH_RESULTS: {
      return {
        ...state,
Severity: Minor
Found in src/applications/third-party-app-directory/reducers/index.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return { ...state };
    Severity: Major
    Found in src/applications/third-party-app-directory/reducers/index.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return {
              ...state,
              scopes: {
                ...state.scopes,
                [action.scopeCategory]: action.response.data,
      Severity: Major
      Found in src/applications/third-party-app-directory/reducers/index.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return {
                ...state,
                error: action.error,
              };
        Severity: Major
        Found in src/applications/third-party-app-directory/reducers/index.js - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status