update jslint demo
This commit is contained in:
parent
87553580ed
commit
2a65f1266f
2 changed files with 11 additions and 8 deletions
|
|
@ -79,17 +79,20 @@ exports.launch = function(env) {
|
|||
});
|
||||
|
||||
worker.on("jslint", function(results) {
|
||||
console.log("jslint", results);
|
||||
|
||||
var rows = [];
|
||||
var errors = [];
|
||||
for (var i=0; i<results.data.length; i++) {
|
||||
var error = results.data[i];
|
||||
if (error)
|
||||
rows.push(error.line-1);
|
||||
errors.push({
|
||||
row: error.line-1,
|
||||
column: error.character-1,
|
||||
text: error.reason,
|
||||
type: "error",
|
||||
lint: error
|
||||
})
|
||||
}
|
||||
|
||||
docs.js.clearBreakpoints();
|
||||
docs.js.setBreakpoints(rows)
|
||||
|
||||
docs.js.setAnnotations(errors)
|
||||
});
|
||||
|
||||
window.mirror = function() {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.ace_gutter-cell.ace_breakpoint {
|
||||
.ace_gutter-cell.ace_error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue