Commons:User scripts/users namespace/reports/User:Rillke/CodeMirror/lib/codemirror.js
This is the report page for User:Rillke/CodeMirror/lib/codemirror.js. It is bot-maintained. All manual changes might be overwritten.
jshint edit
- ISSUE:
line 48 character 67
: Use '===' to compare with 'null'. - Evidence:var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
- ISSUE:
line 333 character 21
: Use '===' to compare with '0'. - Evidence:if (line.height == 0) return 0;
- ISSUE:
line 335 character 46
: Expected a conditional expression and instead saw an assignment. - Evidence:while (merged = collapsedSpanAtStart(cur)) {
- ISSUE:
line 341 character 44
: Expected a conditional expression and instead saw an assignment. - Evidence:while (merged = collapsedSpanAtEnd(cur)) {
- ISSUE:
line 342 character 17
: 'found' is already defined. - Evidence:var found = merged.find(0, true);
- ISSUE:
line 446 character 20
: Use '===' to compare with '0'. - Evidence:if (sWidth == 0) this.overlayHack();
- ISSUE:
line 546 character 40
: Use '!==' to compare with 'null'. - Evidence:var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
- ISSUE:
line 548 character 46
: Use '!==' to compare with 'null'. - Evidence:var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
- ISSUE:
line 669 character 36
: Use '===' to compare with 'null'. - Evidence:(display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
- ISSUE:
line 670 character 68
: Use '===' to compare with '0'. - Evidence:display.renderedView == display.view && countDirtyView(cm) == 0)
- ISSUE:
line 698 character 32
: Use '===' to compare with '0'. - Evidence:if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
- ISSUE:
line 699 character 36
: Use '===' to compare with 'null'. - Evidence:(display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
- ISSUE:
line 735 character 38
: Use '!==' to compare with 'null'. - Evidence:if (viewport && viewport.top != null)
- ISSUE:
line 796 character 22
: A leading decimal point can be confused with a dot: '.001'. - Evidence:if (diff > .001 || diff < -.001) {
- ISSUE:
line 796 character 38
: A leading decimal point can be confused with a dot: '.001'. - Evidence:if (diff > .001 || diff < -.001) {
- ISSUE:
line 857 character 61
: Use '!==' to compare with 'null'. - Evidence:var updateNumber = lineNumbers && updateNumbersFrom != null &&
- ISSUE:
line 986 character 16
: 'next' is already defined. - Evidence:var next = node.nextSibling;
- ISSUE:
line 1060 character 31
: Missing 'new' prefix when invoking a constructor. - Evidence:function copyPos(x) {return Pos(x.line, x.ch);}
- ISSUE:
line 1088 character 60
: Use '===' to compare with '0'. - Evidence:multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
- ISSUE:
line 1099 character 18
: Missing 'new' prefix when invoking a constructor. - Evidence:from = Pos(from.line, from.ch - deleted);
- ISSUE:
line 1101 character 16
: Missing 'new' prefix when invoking a constructor. - Evidence:to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
- ISSUE:
line 1113 character 28
: 'updateInput' used out of scope. - Evidence:cm.curOp.updateInput = updateInput;
- ISSUE:
line 1146 character 32
: Missing 'new' prefix when invoking a constructor. - Evidence:var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
- ISSUE:
line 1146 character 52
: Missing 'new' prefix when invoking a constructor. - Evidence:var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
- ISSUE:
line 1178 character 4
: Unnecessary semicolon. - Evidence:};
- ISSUE:
line 1218 character 56
: Missing '()' invoking a constructor. - Evidence:if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
- ISSUE:
line 1218 character 50
: Confusing use of '!'. - Evidence:if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
- ISSUE:
line 1309 character 23
: Use '!==' to compare with 'null'. - Evidence:if (drawn.teTop != null) {
- ISSUE:
line 1467 character 41
: 'oldScrollY' used out of scope. - Evidence:if (webkit) window.scrollTo(null, oldScrollY);
- ISSUE:
line 1479 character 31
: Use '!==' to compare with 'null'. - Evidence:if (te.selectionStart != null) {
- ISSUE:
line 1498 character 31
: Use '!==' to compare with 'null'. - Evidence:if (te.selectionStart != null) {
- ISSUE:
line 1501 character 78
: Use '===' to compare with '0'. - Evidence:if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
- ISSUE:
line 1561 character 49
: Missing 'new' prefix when invoking a constructor. - Evidence:input.composing.sel = simpleSelection(Pos(prim.head.line, found),
- ISSUE:
line 1562 character 49
: Missing 'new' prefix when invoking a constructor. - Evidence:Pos(prim.head.line, found + data.length));
- ISSUE:
line 1648 character 57
: Use '===' to compare with '0'. - Evidence:cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&
- ISSUE:
line 1649 character 55
: Use '===' to compare with '0'. - Evidence:cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)
- ISSUE:
line 1668 character 11
: 'rng' used out of scope. - Evidence:if (rng) {
- ISSUE:
line 1670 character 22
: 'rng' used out of scope. - Evidence:sel.addRange(rng);
- ISSUE:
line 1671 character 35
: Use '===' to compare with 'null'. - Evidence:if (old && sel.anchorNode == null) sel.addRange(old);
- ISSUE:
line 1754 character 87
: Use '===' to compare with '0'. - Evidence:if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
- ISSUE:
line 1758 character 22
: 'fromLine' is already defined. - Evidence:var fromLine = lineNo(display.view[fromIndex].line);
- ISSUE:
line 1759 character 22
: 'fromNode' is already defined. - Evidence:var fromNode = display.view[fromIndex - 1].node.nextSibling;
- ISSUE:
line 1766 character 20
: 'toLine' is already defined. - Evidence:var toLine = lineNo(display.view[toIndex + 1].line) - 1;
- ISSUE:
line 1767 character 20
: 'toNode' is already defined. - Evidence:var toNode = display.view[toIndex + 1].node.previousSibling;
- ISSUE:
line 1770 character 51
: 'fromNode' used out of scope. - Evidence:var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
- ISSUE:
line 1770 character 61
: 'toNode' used out of scope. - Evidence:var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
- ISSUE:
line 1770 character 69
: 'fromLine' used out of scope. - Evidence:var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
- ISSUE:
line 1770 character 79
: 'toLine' used out of scope. - Evidence:var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
- ISSUE:
line 1771 character 40
: Missing 'new' prefix when invoking a constructor. - Evidence:var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
- ISSUE:
line 1771 character 44
: 'fromLine' used out of scope. - Evidence:var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
- ISSUE:
line 1771 character 44
: Too many errors. (20% scanned). - Evidence:undefined