pisarevdmitry/frontend-project-lvl2

View on GitHub
src/formatters/stylish.js

Summary

Maintainability
A
30 mins
Test Coverage
A
100%

Function buildFormat has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

const buildFormat = (children, depth) => {
  const result = children.map((node) => {
    const { type, value, name } = node;
    switch (type) {
      case 'unchanged': {
Severity: Minor
Found in src/formatters/stylish.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

            return `${space}${name}: {\n${buildFormat(nodeChildren, depth + 1)}\n${space}}`;
    Severity: Major
    Found in src/formatters/stylish.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status