- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
|
|
|
// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js
|
|
|
|
// declare global: coffeelint
|
|
|
|
(function(mod) {
|
|
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
|
mod(require("../../lib/codemirror"));
|
|
else if (typeof define == "function" && define.amd) // AMD
|
|
define(["../../lib/codemirror"], mod);
|
|
else // Plain browser env
|
|
mod(CodeMirror);
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
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;
|
|
});
|
|
|
|
});
|