Showing 218 of 289 total issues
Function ./node_modules/codemirror/lib/codemirror.js
has 9400 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
!(function(t, n) {
e.exports = n()
})(0, function() {
"use strict"
File 0.320b8cca.js
has 11398 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
webpackJsonp([0], {
"./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
!(function(t, n) {
e.exports = n()
})(0, function() {
Function ./node_modules/codemirror/mode/javascript/javascript.js
has a Cognitive Complexity of 1591 (exceeds 5 allowed). Consider refactoring. Open
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"
- Read upRead up
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
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"
Function ./node_modules/codemirror/mode/xml/xml.js
has 365 lines of code (exceeds 25 allowed). Consider refactoring. Open
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"
Function ./node_modules/react-codemirror2/index.js
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
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")
Function defineOptions
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(function defineOptions(e) {
function option(n, r, o, i) {
;(e.defaults[n] = r),
o &&
(t[n] = i
Function a
has 207 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
a = (function(e) {
function CodeMirror(e) {
_classCallCheck(this, CodeMirror)
var t = _possibleConstructorReturn(
this,
Consider simplifying this complex logical expression. Open
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
Function ./node_modules/react-codemirror2/index.js
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
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")
- Read upRead up
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
Open
function registerEventHandlers(e) {
function finishTouch() {
t.activeTouch &&
((n = setTimeout(function() {
return (t.activeTouch = null)
Function ./node_modules/codemirror/mode/jsx/jsx.js
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
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"),
Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
e,
t,
n
) {
Consider simplifying this complex logical expression. Open
Open
if (!this.explicitlyCleared) {
var t = this.doc.cm,
n = t && !t.curOp
if ((n && startOperation(t), hasHandler(this, "clear"))) {
var r = this.find()
Function leftButtonSelect
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function leftButtonSelect(e, t, n, r) {
function extendTo(t) {
if (0 != cmp(d, t))
if (((d = t), "rectangle" == r.unit)) {
for (
Function statement
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
Function j
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
j = (function() {
function charType(n) {
return n <= 247
? e.charAt(n)
: 1424 <= n && n <= 1524
Function drawSelectionRange
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSelectionRange(e, t, n) {
function add(e, t, n, r) {
t < 0 && (t = 0),
(t = Math.round(t)),
(r = Math.round(r)),
Function componentDidMount
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function componentDidMount() {
var e = this
this.props.defineMode &&
this.props.defineMode.name &&
this.props.defineMode.fn &&
Consider simplifying this complex logical expression. Open
Open
if (
(e.iter(l, n.line + 1, function(e) {
c &&
i.collapsed &&
!c.options.lineWrapping &&