# profile-builder/3.16.5/assets/lib/codemirror/addon/lint/coffeescript-lint.js

User Profile Builder – Beautiful User Registration Forms, User Profiles &amp; User Role Editor, version 3.16.5. 26 lines.

- Page: https://pluginprobe.com/plugins/profile-builder/3.16.5/code/assets/lib/codemirror/addon/lint/coffeescript-lint.js
- Raw: https://pluginprobe.com/plugins/profile-builder/3.16.5/raw/assets/lib/codemirror/addon/lint/coffeescript-lint.js
- Modified: 2022-10-05T06:23:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/profile-builder/3.16.5/code/assets/lib/codemirror/addon/lint/coffeescript-lint.js#L10-L20`.

```javascript
// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js

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

```
