1 // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js
3 CodeMirror.registerHelper("lint", "coffeescript", function(text) {
5 var parseError = function(err) {
6 var loc = err.lineNumber;
7 found.push({from: CodeMirror.Pos(loc-1, 0),
8 to: CodeMirror.Pos(loc, 0),
10 message: err.message});
13 var res = coffeelint.lint(text);
14 for(var i = 0; i < res.length; i++) {
18 found.push({from: CodeMirror.Pos(e.location.first_line, 0),
19 to: CodeMirror.Pos(e.location.last_line, e.location.last_column),
25 CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated