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

  1. ISSUE: line 48 character 67: Use '===' to compare with 'null'. - Evidence: var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
  2. ISSUE: line 333 character 21: Use '===' to compare with '0'. - Evidence: if (line.height == 0) return 0;
  3. ISSUE: line 335 character 46: Expected a conditional expression and instead saw an assignment. - Evidence: while (merged = collapsedSpanAtStart(cur)) {
  4. ISSUE: line 341 character 44: Expected a conditional expression and instead saw an assignment. - Evidence: while (merged = collapsedSpanAtEnd(cur)) {
  5. ISSUE: line 342 character 17: 'found' is already defined. - Evidence: var found = merged.find(0, true);
  6. ISSUE: line 446 character 20: Use '===' to compare with '0'. - Evidence: if (sWidth == 0) this.overlayHack();
  7. 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;
  8. ISSUE: line 548 character 46: Use '!==' to compare with 'null'. - Evidence: var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
  9. ISSUE: line 669 character 36: Use '===' to compare with 'null'. - Evidence: (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
  10. ISSUE: line 670 character 68: Use '===' to compare with '0'. - Evidence: display.renderedView == display.view && countDirtyView(cm) == 0)
  11. ISSUE: line 698 character 32: Use '===' to compare with '0'. - Evidence: if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
  12. ISSUE: line 699 character 36: Use '===' to compare with 'null'. - Evidence: (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
  13. ISSUE: line 735 character 38: Use '!==' to compare with 'null'. - Evidence: if (viewport && viewport.top != null)
  14. ISSUE: line 796 character 22: A leading decimal point can be confused with a dot: '.001'. - Evidence: if (diff > .001 || diff < -.001) {
  15. ISSUE: line 796 character 38: A leading decimal point can be confused with a dot: '.001'. - Evidence: if (diff > .001 || diff < -.001) {
  16. ISSUE: line 857 character 61: Use '!==' to compare with 'null'. - Evidence: var updateNumber = lineNumbers && updateNumbersFrom != null &&
  17. ISSUE: line 986 character 16: 'next' is already defined. - Evidence: var next = node.nextSibling;
  18. ISSUE: line 1060 character 31: Missing 'new' prefix when invoking a constructor. - Evidence: function copyPos(x) {return Pos(x.line, x.ch);}
  19. ISSUE: line 1088 character 60: Use '===' to compare with '0'. - Evidence: multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
  20. ISSUE: line 1099 character 18: Missing 'new' prefix when invoking a constructor. - Evidence: from = Pos(from.line, from.ch - deleted);
  21. 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));
  22. ISSUE: line 1113 character 28: 'updateInput' used out of scope. - Evidence: cm.curOp.updateInput = updateInput;
  23. ISSUE: line 1146 character 32: Missing 'new' prefix when invoking a constructor. - Evidence: var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
  24. ISSUE: line 1146 character 52: Missing 'new' prefix when invoking a constructor. - Evidence: var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
  25. ISSUE: line 1178 character 4: Unnecessary semicolon. - Evidence: };
  26. ISSUE: line 1218 character 56: Missing '()' invoking a constructor. - Evidence: if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
  27. ISSUE: line 1218 character 50: Confusing use of '!'. - Evidence: if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
  28. ISSUE: line 1309 character 23: Use '!==' to compare with 'null'. - Evidence: if (drawn.teTop != null) {
  29. ISSUE: line 1467 character 41: 'oldScrollY' used out of scope. - Evidence: if (webkit) window.scrollTo(null, oldScrollY);
  30. ISSUE: line 1479 character 31: Use '!==' to compare with 'null'. - Evidence: if (te.selectionStart != null) {
  31. ISSUE: line 1498 character 31: Use '!==' to compare with 'null'. - Evidence: if (te.selectionStart != null) {
  32. ISSUE: line 1501 character 78: Use '===' to compare with '0'. - Evidence: if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
  33. ISSUE: line 1561 character 49: Missing 'new' prefix when invoking a constructor. - Evidence: input.composing.sel = simpleSelection(Pos(prim.head.line, found),
  34. ISSUE: line 1562 character 49: Missing 'new' prefix when invoking a constructor. - Evidence: Pos(prim.head.line, found + data.length));
  35. ISSUE: line 1648 character 57: Use '===' to compare with '0'. - Evidence: cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&
  36. ISSUE: line 1649 character 55: Use '===' to compare with '0'. - Evidence: cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)
  37. ISSUE: line 1668 character 11: 'rng' used out of scope. - Evidence: if (rng) {
  38. ISSUE: line 1670 character 22: 'rng' used out of scope. - Evidence: sel.addRange(rng);
  39. ISSUE: line 1671 character 35: Use '===' to compare with 'null'. - Evidence: if (old && sel.anchorNode == null) sel.addRange(old);
  40. ISSUE: line 1754 character 87: Use '===' to compare with '0'. - Evidence: if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
  41. ISSUE: line 1758 character 22: 'fromLine' is already defined. - Evidence: var fromLine = lineNo(display.view[fromIndex].line);
  42. ISSUE: line 1759 character 22: 'fromNode' is already defined. - Evidence: var fromNode = display.view[fromIndex - 1].node.nextSibling;
  43. ISSUE: line 1766 character 20: 'toLine' is already defined. - Evidence: var toLine = lineNo(display.view[toIndex + 1].line) - 1;
  44. ISSUE: line 1767 character 20: 'toNode' is already defined. - Evidence: var toNode = display.view[toIndex + 1].node.previousSibling;
  45. ISSUE: line 1770 character 51: 'fromNode' used out of scope. - Evidence: var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  46. ISSUE: line 1770 character 61: 'toNode' used out of scope. - Evidence: var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  47. ISSUE: line 1770 character 69: 'fromLine' used out of scope. - Evidence: var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  48. ISSUE: line 1770 character 79: 'toLine' used out of scope. - Evidence: var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  49. 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));
  50. 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));
  51. ISSUE: line 1771 character 44: Too many errors. (20% scanned). - Evidence: undefined