src/getDiffTree.js
Function getDiffTree
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getDiffTree = (file1, file2) => {
const keys = _.sortBy(Object.keys({ ...file1, ...file2 }));
return keys.map((key) => {
const value1 = file1[key];
Avoid too many return
statements within this function. Open
Open
return {
type: 'unchanged',
key,
value: value1,
};