teamdigitale/italia-app

View on GitHub
ts/store/reducers/userDataProcessing.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function userDataProcessingReducer has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const userDataProcessingReducer = (
  state: UserDataProcessingState = INITIAL_STATE,
  action: Action
): UserDataProcessingState => {
  switch (action.type) {
Severity: Major
Found in ts/store/reducers/userDataProcessing.ts - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

          return {
            ...state,
            ...computedProp(action.payload, pot.none)
          };
    Severity: Major
    Found in ts/store/reducers/userDataProcessing.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return {
              ...state,
              [UserDataProcessingChoiceEnum.DELETE]: pot.some(prevValue)
            };
      Severity: Major
      Found in ts/store/reducers/userDataProcessing.ts - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status