tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Avoid deeply nested control flow statements.
Open

                if (
                  ((r < 0 ? l.inclusiveRight : l.inclusiveLeft) &&
                    (c = movePos(e, c, -r, c && c.line == t.line ? i : null)),
                  c &&
                    c.line == t.line &&
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[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

                            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.markedSpans) {
                            --a
                            continue
                          }
          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 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 (i && !o) {
                                  ++a
                                  break
                                }
                Severity: Major
                Found in docs/build/0.320b8cca.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                    if (
                                      (t.state.draggingText &&
                                        !t.state.draggingText.copy &&
                                        (d = t.listSelections()),
                                      setSelectionNoUndo(t.doc, simpleSelection(n, n)),
                  Severity: Major
                  Found in docs/build/0.320b8cca.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if (M >= L) {
                                      ;(m = m.slice(L - f)), (f = L)
                                      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.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

                      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

                      Consider simplifying this complex logical expression.
                      Open

                                    if (t) {
                                      var o = this.getHelper(e, "wordChars")
                                      ;("before" != e.sticky && r != t.length) || !n ? ++r : --n
                                      for (
                                        var i = t.charAt(n),
                      Severity: Major
                      Found in docs/build/0.320b8cca.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (0 != cmp(a, d)) {
                                      ;(e.curOp.focus = activeElt()), extendTo(a)
                                      var s = visibleLines(o, i)
                                      ;(a.line >= s.to || a.line < s.from) &&
                                        setTimeout(
                        Severity: Major
                        Found in docs/build/0.320b8cca.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                    if (
                                      (0 == r.ch &&
                                        r.line > e.firstLine() &&
                                        (r = Pos(r.line - 1, getLine(e.doc, r.line - 1).length)),
                                      o.ch == getLine(e.doc, o.line).text.length &&
                          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 (i.empty())
                                                i.head.line > r &&
                                                  (indentLine(t, i.head.line, e, !0),
                                                  (r = i.head.line),
                                                  o == t.doc.sel.primIndex && ensureCursorVisible(t))
                              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

                                          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 (
                                              !(
                                                eventInWidget(t.display, e) ||
                                                signalDOMEvent(t, e) ||
                                                (e.ctrlKey && !e.altKey) ||
                                    Severity: Major
                                    Found in docs/build/0.320b8cca.js - About 40 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language