57Viktor57/project-lvl2-s329

View on GitHub

Showing 3 of 9 total issues

Function getAst has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getAst = (before, after) => {
  const keys = _.union(Object.keys(before), Object.keys(after));

  return keys.reduce((acc, item) => {
    const beforeItem = before[item];
Severity: Minor
Found in src/getAst.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return [...acc, {
          type: 'added',
          key: item,
          value: afterItem,
        }];
    Severity: Major
    Found in src/getAst.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return [...acc, {
              type: 'deleted',
              key: item,
              value: beforeItem,
            }];
      Severity: Major
      Found in src/getAst.js - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language