18F/federalist

View on GitHub
frontend/reducers/userEnvironmentVariables.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Function userEnvironmentVariables has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

export default function userEnvironmentVariables(state = initialState, action) {
  switch (action.type) {
    case HTTP_ERROR: {
      const { siteId } = action.payload || {};
      return {
Severity: Major
Found in frontend/reducers/userEnvironmentVariables.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Wontfix

          return {
            ...state,
            [siteId]: {
              isLoading: false,
              data: state[siteId].data.filter(uev => uev.id !== uevId),
    Severity: Major
    Found in frontend/reducers/userEnvironmentVariables.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status