PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 2.0.4
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v2.0.4
4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 All 340 releases
profile-builder / assets / lib / codemirror / addon / lint / coffeescript-lint.js

coffeescript-lint.js in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 2.0.4, at assets/lib/codemirror/addon/lint/coffeescript-lint.js

26 lines 851 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js
2
3 CodeMirror.registerHelper("lint", "coffeescript", function(text) {
4 var found = [];
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),
9 severity: err.level,
10 message: err.message});
11 };
12 try {
13 var res = coffeelint.lint(text);
14 for(var i = 0; i < res.length; i++) {
15 parseError(res[i]);
16 }
17 } catch(e) {
18 found.push({from: CodeMirror.Pos(e.location.first_line, 0),
19 to: CodeMirror.Pos(e.location.last_line, e.location.last_column),
20 severity: 'error',
21 message: e.message});
22 }
23 return found;
24 });
25 CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated
26