tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Function coordsBidiPart has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function coordsBidiPart(e, t, n, r, o, i, a) {
        var s = findFirst(
            function(s) {
              var l = o[s],
                c = 1 != l.level
Severity: Minor
Found in docs/build/0.320b8cca.js - About 1 hr to fix

    Function addLineWidget has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function addLineWidget(e, t, n, r) {
            var o = new ye(e, n, r),
              i = e.cm
            return (
              i && o.noHScroll && (i.display.alignWidgets = !0),
    Severity: Minor
    Found in docs/build/0.320b8cca.js - About 1 hr to fix

      Function findFatArrow has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function findFatArrow(e, t) {
                t.fatArrowAt && (t.fatArrowAt = null)
                var n = e.string.indexOf("=>", e.start)
                if (!(n < 0)) {
                  if (c) {
      Severity: Minor
      Found in docs/build/0.320b8cca.js - About 1 hr to fix

        Function maybeoperatorNoComma has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function maybeoperatorNoComma(e, t, n) {
                  var r = 0 == n ? maybeoperatorComma : maybeoperatorNoComma,
                    o = 0 == n ? expression : expressionNoComma
                  return "=>" == e
                    ? cont(pushcontext, n ? arrowBodyNoComma : arrowBody, popcontext)
        Severity: Minor
        Found in docs/build/0.320b8cca.js - About 1 hr to fix

          Function maybeScrollWindow has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function maybeScrollWindow(e, t) {
                  if (!signalDOMEvent(e, "scrollCursorIntoView")) {
                    var n = e.display,
                      r = n.sizer.getBoundingClientRect(),
                      o = null
          Severity: Minor
          Found in docs/build/0.320b8cca.js - About 1 hr to fix

            Function indent has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        indent: function(t, n, r) {
                          var o = t.context
                          if (t.tokenize.isInAttribute)
                            return t.tagStart == t.indented
                              ? t.stringStartCol + 1
            Severity: Minor
            Found in docs/build/0.320b8cca.js - About 1 hr to fix

              Function removeReadOnlyRanges has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function removeReadOnlyRanges(e, t, n) {
                      var r = null
                      if (
                        (e.iter(t.line, n.line + 1, function(e) {
                          if (e.markedSpans)
              Severity: Minor
              Found in docs/build/0.320b8cca.js - About 1 hr to fix

                Function posFromMouse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function posFromMouse(e, t, n, r) {
                        var o = e.display
                        if (!n && "true" == e_target(t).getAttribute("cm-not-content"))
                          return null
                        var i,
                Severity: Minor
                Found in docs/build/0.320b8cca.js - About 1 hr to fix

                  Function endOperation_finish has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function endOperation_finish(e) {
                          var t = e.cm,
                            n = t.display,
                            r = t.doc
                          e.updatedDisplay && postUpdateDisplay(t, e.update),
                  Severity: Minor
                  Found in docs/build/0.320b8cca.js - About 1 hr to fix

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

                                ;(r.teTop = Math.max(
                                  0,
                                  Math.min(t.wrapper.clientHeight - 10, o.top + a.top - i.top)
                                )),
                    Severity: Major
                    Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
                    docs/build/0.320b8cca.js on lines 8358..8361

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

                    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

                                (null != c.scrollTop &&
                                  (updateScrollTop(e, c.scrollTop),
                                  Math.abs(e.doc.scrollTop - u) > 1 && (a = !0)),
                    Severity: Major
                    Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
                    docs/build/0.320b8cca.js on lines 2755..2757

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

                    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

                                null != c.scrollLeft &&
                                  (setScrollLeft(e, c.scrollLeft),
                                  Math.abs(e.doc.scrollLeft - d) > 1 && (a = !0)),
                    Severity: Major
                    Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
                    docs/build/0.320b8cca.js on lines 2752..2754

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

                    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

                                  (r.teLeft = Math.max(
                                    0,
                                    Math.min(t.wrapper.clientWidth - 10, o.left + a.left - i.left)
                                  ))
                    Severity: Major
                    Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
                    docs/build/0.320b8cca.js on lines 8354..8357

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

                    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 inText has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function inText(e, t) {
                              function chain(n) {
                                return (t.tokenize = n), n(e, t)
                              }
                              var n = e.next()
                    Severity: Minor
                    Found in docs/build/0.320b8cca.js - About 1 hr to fix

                      Function l has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                        l = function(e, r) {
                                          if (
                                            !t.options.allowDropFileTypes ||
                                            -1 != indexOf(t.options.allowDropFileTypes, e.type)
                                          ) {
                      Severity: Minor
                      Found in docs/build/0.320b8cca.js - About 1 hr to fix

                        Function handleNotify has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          handleNotify(type, message, title, optionsOverride = {}) {
                            if (
                              this.props.preventDuplicates &&
                              _.includes(this.state.toastList, { message })
                            ) {
                        Severity: Minor
                        Found in src/components/ToastContainer.jsx - About 1 hr to fix

                          Function update has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                ;(ce.prototype.update = function(e) {
                                  var t = e.scrollWidth > e.clientWidth + 1,
                                    n = e.scrollHeight > e.clientHeight + 1,
                                    r = e.nativeBarWidth
                                  if (n) {
                          Severity: Minor
                          Found in docs/build/0.320b8cca.js - About 1 hr to fix

                            Function removeInner has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      removeInner: function removeInner(e, t) {
                                        var n = this
                                        this.size -= t
                                        for (var r = 0; r < this.children.length; ++r) {
                                          var o = n.children[r],
                            Severity: Minor
                            Found in docs/build/0.320b8cca.js - About 1 hr to fix

                              Function makeChangeSingleDoc has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    function makeChangeSingleDoc(e, t, n, r) {
                                      if (e.cm && !e.cm.curOp)
                                        return operation(e.cm, makeChangeSingleDoc)(e, t, n, r)
                                      if (t.to.line < e.first)
                                        shiftDoc(e, t.text.length - 1 - (t.to.line - t.from.line))
                              Severity: Minor
                              Found in docs/build/0.320b8cca.js - About 1 hr to fix

                                Function normalizeKeyMap has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      function normalizeKeyMap(e) {
                                        var t = {}
                                        for (var n in e)
                                          if (e.hasOwnProperty(n)) {
                                            var r = e[n]
                                Severity: Minor
                                Found in docs/build/0.320b8cca.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language