maksdk/frontend-project-lvl2

View on GitHub

Showing 3 of 3 total issues

Function generateDifferences has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const generateDifferences = (obj1, obj2) => {
  const keys = _.union(_.keys(obj1), _.keys(obj2));

  return keys.map((key) => {
    if (_.has(obj1, key) && !_.has(obj2, key)) {
Severity: Minor
Found in src/generateDifferences.js - About 1 hr to fix

    Function buildDiffs has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const buildDiffs = (diffs, depth) => {
      const stringifiedDiffs = diffs.map((diff) => {
        const {
          type,
          value,
    Severity: Minor
    Found in src/formatters/object.js - About 1 hr to fix

      Avoid too many return statements within this function.
      Open

            return {
              key,
              newValue: obj2[key],
              oldValue: obj1[key],
              type: 'changed',
      Severity: Major
      Found in src/generateDifferences.js - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language