dopry/netlify-cms

View on GitHub
src/components/Widgets/Markdown/serializers/remarkSlate.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function convertNode has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function convertNode(node, nodes) {

  /**
   * Unified/Remark processors use mutable operations, so we don't want to
   * change a node's type directly for conversion purposes, as that tends to
Severity: Major
Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

          return createBlock(slateType, nodes);
    Severity: Major
    Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return createText('\n');
      Severity: Major
      Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return createBlock(typeMap[type], { isVoid: true });
        Severity: Major
        Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return createText(convertMarkNode(node));
          Severity: Major
          Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return createBlock(typeMap[type], nodes, { data });
            Severity: Major
            Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return createBlock(slateType, nodes, { data });
              Severity: Major
              Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return createInline(typeMap[type], nodes, { data });
                Severity: Major
                Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return createBlock(typeMap[type], nodes, { data });
                  Severity: Major
                  Found in src/components/Widgets/Markdown/serializers/remarkSlate.js - About 30 mins to fix

                    There are no issues that match your filters.

                    Category
                    Status