tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Avoid deeply nested control flow statements.
Open

                for (var k = 0; k < y.length; ++k)
                  buildCollapsedSpan(t, 0, y[k])
Severity: Major
Found in docs/build/0.320b8cca.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (s) for (var l = 0; l < s.length; l++) s[l].style.left = i
    Severity: Major
    Found in docs/build/0.320b8cca.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      for (var S = 0; S < b.length; S += 2)
                        b[S + 1] == v && (c += " " + b[S])
      Severity: Major
      Found in docs/build/0.320b8cca.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        if (h[f].node == p) {
                          e.display.currentWheelTarget = p
                          break e
                        }
        Severity: Major
        Found in docs/build/0.320b8cca.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          if (l != a) throw new Error("Inconsistent bindings for " + s)
          Severity: Major
          Found in docs/build/0.320b8cca.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            for (var d in c)
                              (u = d.match(/^spans_(\d+)$/)) &&
                                indexOf(t, Number(u[1])) > -1 &&
                                ((lst(s)[d] = c[d]), delete c[d])
            Severity: Major
            Found in docs/build/0.320b8cca.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (
                                    !t.options.allowDropFileTypes ||
                                    -1 != indexOf(t.options.allowDropFileTypes, e.type)
                                  ) {
                                    var a = new FileReader()
              Severity: Major
              Found in docs/build/0.320b8cca.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                if (i[c].marker == l.marker) continue e
                Severity: Major
                Found in docs/build/0.320b8cca.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      for (++z; z < E && a.test(c[z]); ++z);
                  Severity: Major
                  Found in docs/build/0.320b8cca.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if (i && !o) {
                                      ++a
                                      break
                                    }
                    Severity: Major
                    Found in docs/build/0.320b8cca.js - About 45 mins to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              var n = t.textClass
                                ? t.textClass + " " + (t.line.textClass || "")
                                : t.line.textClass
                      Severity: Minor
                      Found in docs/build/0.320b8cca.js and 1 other location - About 40 mins to fix
                      docs/build/0.320b8cca.js on lines 1483..1485

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 49.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              var n = t.bgClass
                                ? t.bgClass + " " + (t.line.bgClass || "")
                                : t.line.bgClass
                      Severity: Minor
                      Found in docs/build/0.320b8cca.js and 1 other location - About 40 mins to fix
                      docs/build/0.320b8cca.js on lines 1522..1524

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 49.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Consider simplifying this complex logical expression.
                      Open

                              if (a && s < 9 && !c && (!o || (!o.left && !o.right))) {
                                var f = l.parentNode.getClientRects()[0]
                                o = f
                                  ? {
                                      left: f.left,
                      Severity: Major
                      Found in docs/build/0.320b8cca.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (
                                  !(
                                    hasHandler(e, "beforeChange") ||
                                    (e.cm && hasHandler(e.cm, "beforeChange"))
                                  ) ||
                        Severity: Major
                        Found in docs/build/0.320b8cca.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if (
                                        ((r = e[c + 2]),
                                        s == l && n == (r.insertLeft ? "left" : "right") && (a = n),
                                        "left" == n && 0 == o)
                                      )
                          Severity: Major
                          Found in docs/build/0.320b8cca.js - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                        if (
                                          (o =
                                            a && s < 9 && 0 == c && u == i.coverEnd - i.coverStart
                                              ? l.parentNode.getBoundingClientRect()
                                              : getUsefulRect(w(l, c, u).getClientRects(), r)).left ||
                            Severity: Major
                            Found in docs/build/0.320b8cca.js - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if (
                                        !s &&
                                        0 == l &&
                                        !t.force &&
                                        n.renderedView == n.view &&
                              Severity: Major
                              Found in docs/build/0.320b8cca.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if (!t.styles || t.styles[0] != e.state.modeGen) {
                                          var r = getContextBefore(e, lineNo(t)),
                                            o =
                                              t.text.length > e.options.maxHighlightLength &&
                                              copyState(e.doc.mode, r.state),
                                Severity: Major
                                Found in docs/build/0.320b8cca.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          else if (
                                            !signalDOMEvent(e, t) &&
                                            !eventInWidget(e.display, t) &&
                                            (t.dataTransfer.setData("Text", e.getSelection()),
                                            (t.dataTransfer.effectAllowed = "copyMove"),
                                  Severity: Major
                                  Found in docs/build/0.320b8cca.js - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                if (
                                                  (l && (f = window.scrollY),
                                                  r.input.focus(),
                                                  l && window.scrollTo(null, f),
                                                  r.input.reset(),
                                    Severity: Major
                                    Found in docs/build/0.320b8cca.js - About 40 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language