tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Function updateLineGutter has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function updateLineGutter(e, t, n, r) {
        if (
          (t.gutter && (t.node.removeChild(t.gutter), (t.gutter = null)),
          t.gutterBackground &&
            (t.node.removeChild(t.gutterBackground),
Severity: Major
Found in docs/build/0.320b8cca.js - About 2 hrs to fix

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

                      this.props.onScroll &&
                        this.editor.on("scroll", function(t) {
                          var n = e.editor.getScrollInfo()
                          e.props.onScroll(e.editor, { x: n.left, y: n.top })
                        }),
    Severity: Major
    Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
    docs/build/0.320b8cca.js on lines 11139..11143

    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 89.

    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

                      this.props.onCursor &&
                        this.editor.on("cursorActivity", function(t) {
                          var n = e.editor.getCursor()
                          e.props.onCursor(e.editor, { line: n.line, ch: n.ch })
                        }),
    Severity: Major
    Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
    docs/build/0.320b8cca.js on lines 11134..11138

    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 89.

    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)
                    for (var s = 0; s < a.length; s++) {
                      var l = a[s]
                      ;(null != l.to && o == e.line && e.ch >= l.to) ||
                        (null == l.from && o != e.line) ||
    Severity: Critical
    Found in docs/build/0.320b8cca.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

              if (((t.curOp.focus = activeElt()), !signalDOMEvent(t, e))) {
                a && s < 11 && 27 == e.keyCode && (e.returnValue = !1)
                var n = e.keyCode
                t.display.shift = 16 == n || e.shiftKey
                var r = handleKeyBinding(t, e)
      Severity: Critical
      Found in docs/build/0.320b8cca.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                      if (g.top - f.top <= 3) {
                        var x = (c ? v : m) && b,
                          C = (c ? m : v) && y ? s : (h ? f : g).left,
                          w = x ? l : (h ? g : f).right
                        add(C, f.top, w - C, f.bottom)
        Severity: Critical
        Found in docs/build/0.320b8cca.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (
                    (o.lastOp == r ||
                      (o.lastOrigin == t.origin &&
                        t.origin &&
                        (("+" == t.origin.charAt(0) &&
          Severity: Critical
          Found in docs/build/0.320b8cca.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                          if (r.line >= e.display.viewFrom) {
                            var a = i.styles,
                              s =
                                i.text.length > e.options.maxHighlightLength
                                  ? copyState(t.mode, r.state)
            Severity: Critical
            Found in docs/build/0.320b8cca.js - About 2 hrs to fix

              Function buildToken has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function buildToken(e, t, n, r, o, i, l) {
                      if (t) {
                        var c,
                          u = e.splitSpaces ? splitSpaces(t, e.trailingSpace) : t,
                          d = e.cm.state.specialChars,
              Severity: Major
              Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                Function moveVisually has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function moveVisually(e, t, n, r) {
                        var o = getOrder(t, e.doc.direction)
                        if (!o) return moveLogically(t, n, r)
                        n.ch >= t.text.length
                          ? ((n.ch = t.text.length), (n.sticky = "before"))
                Severity: Major
                Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                  Function buildLineContent has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function buildLineContent(e, t) {
                          var n = eltP("span", null, null, l ? "padding-right: .1px" : null),
                            r = {
                              pre: eltP("pre", [n], "CodeMirror-line"),
                              content: n,
                  Severity: Major
                  Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                    Function drawForLine has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function drawForLine(t, n, r) {
                              function coords(n, r) {
                                return charCoords(e, Pos(t, n), "div", u, r)
                              }
                              function wrapX(t, n, r) {
                    Severity: Major
                    Found in docs/build/0.320b8cca.js - About 2 hrs to fix

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

                            function pageScrollX() {
                              return u && m
                                ? -(
                                    document.body.getBoundingClientRect().left -
                                    parseInt(getComputedStyle(document.body).marginLeft)
                      Severity: Major
                      Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
                      docs/build/0.320b8cca.js on lines 1970..1978

                      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 82.

                      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

                            function pageScrollY() {
                              return u && m
                                ? -(
                                    document.body.getBoundingClientRect().top -
                                    parseInt(getComputedStyle(document.body).marginTop)
                      Severity: Major
                      Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
                      docs/build/0.320b8cca.js on lines 1961..1969

                      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 82.

                      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

                                      linkedDocs(e, function(e, t) {
                                        t ||
                                          -1 != indexOf(s, e.history) ||
                                          (rebaseHist(e.history, o), s.push(e.history)),
                                          makeChangeSingleDoc(e, o, null, mergeOldSpans(e, o))
                      Severity: Major
                      Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
                      docs/build/0.320b8cca.js on lines 4175..4180

                      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 80.

                      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

                                linkedDocs(e, function(e, n) {
                                  n ||
                                    -1 != indexOf(r, e.history) ||
                                    (rebaseHist(e.history, t), r.push(e.history)),
                                    makeChangeSingleDoc(e, t, null, stretchSpansOverChange(e, t))
                      Severity: Major
                      Found in docs/build/0.320b8cca.js and 1 other location - About 2 hrs to fix
                      docs/build/0.320b8cca.js on lines 4229..4234

                      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 80.

                      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

                      Function coordsCharInner has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            function coordsCharInner(e, t, n, r, o) {
                              o -= heightAtLine(t)
                              var i = prepareMeasureForLine(e, t),
                                a = widgetTopHeight(t),
                                s = 0,
                      Severity: Major
                      Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                        Function updateDisplayIfNeeded has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function updateDisplayIfNeeded(e, t) {
                                var n = e.display,
                                  r = e.doc
                                if (t.editorIsHidden) return resetView(e), !1
                                if (
                        Severity: Major
                        Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                          Function makeChangeFromHistory has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                function makeChangeFromHistory(e, t, n) {
                                  if (!e.cm || !e.cm.state.suppressEdits || n) {
                                    for (
                                      var r,
                                        o = e.history,
                          Severity: Major
                          Found in docs/build/0.320b8cca.js - About 2 hrs to fix

                            Function CodeMirror$1 has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  function CodeMirror$1(e, t) {
                                    var n = this
                                    if (!(this instanceof CodeMirror$1)) return new CodeMirror$1(e, t)
                                    ;(this.options = t = t ? copyObj(t) : {}),
                                      copyObj(Be, t, !1),
                            Severity: Major
                            Found in docs/build/0.320b8cca.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language