dopry/netlify-cms

View on GitHub
src/reducers/search.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function entries has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const entries = (state = defaultState, action) => {
  switch (action.type) {
    case SEARCH_CLEAR:
      return defaultState;

Severity: Minor
Found in src/reducers/search.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return state.withMutations((map) => {
            map.set('isFetching', false);
            map.set('term', searchTerm);
            map.set('queryHits', Map({ [action.payload.namespace]: response.hits }));
          });
    Severity: Major
    Found in src/reducers/search.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return state;
      Severity: Major
      Found in src/reducers/search.js - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status