tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Function ./node_modules/codemirror/lib/codemirror.js has 9400 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  "./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
    !(function(t, n) {
      e.exports = n()
    })(0, function() {
      "use strict"
Severity: Major
Found in docs/build/0.320b8cca.js - About 1 mo to fix

    File 0.320b8cca.js has 11398 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    webpackJsonp([0], {
      "./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
        !(function(t, n) {
          e.exports = n()
        })(0, function() {
    Severity: Major
    Found in docs/build/0.320b8cca.js - About 1 mo to fix

      Function ./node_modules/codemirror/mode/javascript/javascript.js has a Cognitive Complexity of 1591 (exceeds 5 allowed). Consider refactoring.
      Open

        "./node_modules/codemirror/mode/javascript/javascript.js": function(e, t, n) {
          !(function(e) {
            e(n("./node_modules/codemirror/lib/codemirror.js"))
          })(function(e) {
            "use strict"
      Severity: Minor
      Found in docs/build/0.320b8cca.js - About 1 mo to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function ./node_modules/codemirror/mode/javascript/javascript.js has 1036 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        "./node_modules/codemirror/mode/javascript/javascript.js": function(e, t, n) {
          !(function(e) {
            e(n("./node_modules/codemirror/lib/codemirror.js"))
          })(function(e) {
            "use strict"
      Severity: Major
      Found in docs/build/0.320b8cca.js - About 5 days to fix

        Function ./node_modules/codemirror/mode/xml/xml.js has 365 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          "./node_modules/codemirror/mode/xml/xml.js": function(e, t, n) {
            !(function(e) {
              e(n("./node_modules/codemirror/lib/codemirror.js"))
            })(function(e) {
              "use strict"
        Severity: Major
        Found in docs/build/0.320b8cca.js - About 1 day to fix

          Function ./node_modules/react-codemirror2/index.js has 262 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            "./node_modules/react-codemirror2/index.js": function(e, t, n) {
              "use strict"
              function _classCallCheck(e, t) {
                if (!(e instanceof t))
                  throw new TypeError("Cannot call a class as a function")
          Severity: Major
          Found in docs/build/0.320b8cca.js - About 1 day to fix

            Function defineOptions has 227 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    (function defineOptions(e) {
                      function option(n, r, o, i) {
                        ;(e.defaults[n] = r),
                          o &&
                            (t[n] = i
            Severity: Major
            Found in docs/build/0.320b8cca.js - About 1 day to fix

              Function a has 207 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    a = (function(e) {
                      function CodeMirror(e) {
                        _classCallCheck(this, CodeMirror)
                        var t = _possibleConstructorReturn(
                          this,
              Severity: Major
              Found in docs/build/0.320b8cca.js - About 1 day to fix

                Consider simplifying this complex logical expression.
                Open

                            if (v == f) {
                              ;(l = c = u = d = s = ""), (p = null), (v = 1 / 0)
                              for (var y = [], b = void 0, x = 0; x < r.length; ++x) {
                                var C = r[x],
                                  w = C.marker
                Severity: Critical
                Found in docs/build/0.320b8cca.js - About 7 hrs to fix

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

                        h = (function() {
                          function defineProperties(e, t) {
                            for (var n = 0; n < t.length; n++) {
                              var r = t[n]
                              ;(r.enumerable = r.enumerable || !1),
                  Severity: Major
                  Found in docs/build/0.320b8cca.js and 1 other location - About 6 hrs to fix
                  docs/build/0.320b8cca.js on lines 11000..11017

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

                  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 r = (function() {
                          function defineProperties(e, t) {
                            for (var n = 0; n < t.length; n++) {
                              var r = t[n]
                              ;(r.enumerable = r.enumerable || !1),
                  Severity: Major
                  Found in docs/build/0.320b8cca.js and 1 other location - About 6 hrs to fix
                  docs/build/0.320b8cca.js on lines 11288..11305

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

                  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 ./node_modules/react-codemirror2/index.js has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                  Open

                    "./node_modules/react-codemirror2/index.js": function(e, t, n) {
                      "use strict"
                      function _classCallCheck(e, t) {
                        if (!(e instanceof t))
                          throw new TypeError("Cannot call a class as a function")
                  Severity: Minor
                  Found in docs/build/0.320b8cca.js - About 5 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function registerEventHandlers has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function registerEventHandlers(e) {
                          function finishTouch() {
                            t.activeTouch &&
                              ((n = setTimeout(function() {
                                return (t.activeTouch = null)
                  Severity: Major
                  Found in docs/build/0.320b8cca.js - About 5 hrs to fix

                    Function ./node_modules/codemirror/mode/jsx/jsx.js has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      "./node_modules/codemirror/mode/jsx/jsx.js": function(e, t, n) {
                        !(function(e) {
                          e(
                            n("./node_modules/codemirror/lib/codemirror.js"),
                            n("./node_modules/codemirror/mode/xml/xml.js"),
                    Severity: Major
                    Found in docs/build/0.320b8cca.js - About 5 hrs to fix

                      Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        "./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
                          e,
                          t,
                          n
                        ) {
                      Severity: Major
                      Found in docs/build/0.320b8cca.js - About 5 hrs to fix

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

                            function _inherits(e, t) {
                              if ("function" != typeof t && null !== t)
                                throw new TypeError(
                                  "Super expression must either be null or a function, not " + typeof t
                                )
                        Severity: Major
                        Found in docs/build/0.320b8cca.js and 1 other location - About 5 hrs to fix
                        docs/build/0.320b8cca.js on lines 10981..10998

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

                        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 _inherits(e, t) {
                              if ("function" != typeof t && null !== t)
                                throw new TypeError(
                                  "Super expression must either be null or a function, not " + typeof t
                                )
                        Severity: Major
                        Found in docs/build/0.320b8cca.js and 1 other location - About 5 hrs to fix
                        docs/build/0.320b8cca.js on lines 11250..11267

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

                        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 (!this.explicitlyCleared) {
                                  var t = this.doc.cm,
                                    n = t && !t.curOp
                                  if ((n && startOperation(t), hasHandler(this, "clear"))) {
                                    var r = this.find()
                        Severity: Critical
                        Found in docs/build/0.320b8cca.js - About 5 hrs to fix

                          Function leftButtonSelect has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                function leftButtonSelect(e, t, n, r) {
                                  function extendTo(t) {
                                    if (0 != cmp(d, t))
                                      if (((d = t), "rectangle" == r.unit)) {
                                        for (
                          Severity: Major
                          Found in docs/build/0.320b8cca.js - About 4 hrs to fix

                            Function statement has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function statement(e, t) {
                                      return "var" == e
                                        ? cont(pushlex("vardef", t.length), vardef, expect(";"), poplex)
                                        : "keyword a" == e
                                          ? cont(pushlex("form"), parenExpr, statement, poplex)
                            Severity: Major
                            Found in docs/build/0.320b8cca.js - About 4 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language