File modules/editor/codemirror/addon/lint/coffeescript-lint.min.js

Last commit: Tue May 22 22:39:52 2018 +0200	Jan Dankert	Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.
1 // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 // Distributed under an MIT license: http://codemirror.net/LICENSE 3 4 // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js 5 6 // declare global: coffeelint 7 8 (function(mod) { 9 if (typeof exports == "object" && typeof module == "object") // CommonJS 10 mod(require("../../lib/codemirror")); 11 else if (typeof define == "function" && define.amd) // AMD 12 define(["../../lib/codemirror"], mod); 13 else // Plain browser env 14 mod(CodeMirror); 15 })(function(CodeMirror) { 16 "use strict"; 17 18 CodeMirror.registerHelper("lint", "coffeescript", function(text) { 19 var found = []; 20 if (!window.coffeelint) { 21 if (window.console) { 22 window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."); 23 } 24 return found; 25 } 26 var parseError = function(err) { 27 var loc = err.lineNumber; 28 found.push({from: CodeMirror.Pos(loc-1, 0), 29 to: CodeMirror.Pos(loc, 0), 30 severity: err.level, 31 message: err.message}); 32 }; 33 try { 34 var res = coffeelint.lint(text); 35 for(var i = 0; i < res.length; i++) { 36 parseError(res[i]); 37 } 38 } catch(e) { 39 found.push({from: CodeMirror.Pos(e.location.first_line, 0), 40 to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 41 severity: 'error', 42 message: e.message}); 43 } 44 return found; 45 }); 46 47 });
Download modules/editor/codemirror/addon/lint/coffeescript-lint.min.js
History Tue, 22 May 2018 22:39:52 +0200 Jan Dankert Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.