Commit 2e2fc4aa authored by Jérome Perrin's avatar Jérome Perrin

Revert "monaco_editor: also lint javascript with jslint"

This reverts commit 0b7ed9ad.
parent 34efb9f3
......@@ -7,7 +7,6 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="jslint.js" type="text/javascript"></script>
<script src="monaco-editor/prettier@1.14.0/standalone.js"></script>
<script src="monaco-editor/prettier@1.14.0/parser-babylon.js"></script>
......
/*jslint nomen: true, indent: 2 */
/*global window, rJS, monaco, JSLINT */
/*global window, rJS, monaco*/
(function(window, rJS, monaco) {
'use strict';
......@@ -49,29 +49,6 @@
editor.getModel().onDidChangeContent(deferNotifyChange);
})
.declareJob('runJsLint', function () {
var context = this;
return new RSVP.Queue()
.push(function () { return RSVP.delay(500); })
.push(function () {
if (context.state.model_language === 'javascript') {
JSLINT(context.editor.getValue(), {});
monaco.editor.setModelMarkers(
context.editor.getModel(),
'jslint',
JSLINT.data()
.errors.filter(Boolean)
.map(err => ({
startLineNumber: err.line,
startColumn: err.character,
message: err.reason,
severity: monaco.Severity.Error,
source: 'jslint'
}))
);
}
});
})
.declareMethod('render', function(options) {
var model_language,
state_dict = {
......@@ -135,11 +112,7 @@
}
);
// lint with jslint
this.editor.getModel().onDidChangeContent(this.runJsLint.bind(this));
this.runJsLint();
// lint with typescript compiler
// Annotations for javascript
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
noSemanticValidation: false,
noSyntaxValidation: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment