department-of-veterans-affairs/vets-website

View on GitHub
src/applications/yellow-ribbon/reducers/index.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function yellowRibbonReducer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const yellowRibbonReducer = (state = initialState, action) => {
  switch (action.type) {
    case FETCH_RESULTS: {
      return {
        ...state,
Severity: Minor
Found in src/applications/yellow-ribbon/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/yellow-ribbon/reducers/index.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return { ...state, isToolTipOpen: !state.isToolTipOpen };
      Severity: Major
      Found in src/applications/yellow-ribbon/reducers/index.js - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status