Sha256: b7ef0333cf144367b0023e1d19fdf0d7675efdcbda90ccb20e6305e7c5da31c9
Contents?: true
Size: 882 Bytes
Versions: 11
Compression:
Stored size: 882 Bytes
Contents
// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js // declare global: coffeelint CodeMirror.registerHelper("lint", "coffeescript", function(text) { var found = []; var parseError = function(err) { var loc = err.lineNumber; found.push({from: CodeMirror.Pos(loc-1, 0), to: CodeMirror.Pos(loc, 0), severity: err.level, message: err.message}); }; try { var res = coffeelint.lint(text); for(var i = 0; i < res.length; i++) { parseError(res[i]); } } catch(e) { found.push({from: CodeMirror.Pos(e.location.first_line, 0), to: CodeMirror.Pos(e.location.last_line, e.location.last_column), severity: 'error', message: e.message}); } return found; }); CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated
Version data entries
11 entries across 11 versions & 3 rubygems