tomchentw/react-toastr

View on GitHub

Showing 218 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

                  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

                        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

                              Function j has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      j = (function() {
                                        function charType(n) {
                                          return n <= 247
                                            ? e.charAt(n)
                                            : 1424 <= n && n <= 1524
                              Severity: Major
                              Found in docs/build/0.320b8cca.js - About 4 hrs to fix

                                Function drawSelectionRange has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      function drawSelectionRange(e, t, n) {
                                        function add(e, t, n, r) {
                                          t < 0 && (t = 0),
                                            (t = Math.round(t)),
                                            (r = Math.round(r)),
                                Severity: Major
                                Found in docs/build/0.320b8cca.js - About 4 hrs to fix

                                  Function componentDidMount has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                value: function componentDidMount() {
                                                  var e = this
                                                  this.props.defineMode &&
                                                    this.props.defineMode.name &&
                                                    this.props.defineMode.fn &&
                                  Severity: Major
                                  Found in docs/build/0.320b8cca.js - About 3 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (
                                              (e.iter(l, n.line + 1, function(e) {
                                                c &&
                                                  i.collapsed &&
                                                  !c.options.lineWrapping &&
                                    Severity: Critical
                                    Found in docs/build/0.320b8cca.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language