From ec26e6ddac35c7c39a57023821158b06ad7b827f Mon Sep 17 00:00:00 2001 From: MathuraMG Date: Fri, 5 Aug 2016 12:53:16 -0400 Subject: [PATCH] add printing of lint messages --- client/modules/IDE/components/Editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/modules/IDE/components/Editor.js b/client/modules/IDE/components/Editor.js index a7f5ab5e..2c18f869 100644 --- a/client/modules/IDE/components/Editor.js +++ b/client/modules/IDE/components/Editor.js @@ -36,6 +36,8 @@ class Editor extends React.Component { }); this._cm.on('change', debounce(200, () => { this.props.updateFileContent(this.props.file.name, this._cm.getValue()); + let annotations = this._cm.state.lint.marked; + annotations.forEach(function (x) { console.log(x.__annotation.severity + ' in line number ' + (x.__annotation.from.line + 1) + ' : ' + x.__annotation.message); }); })); // this._cm.on('change', () => { // eslint-disable-line // // this.props.updateFileContent('sketch.js', this._cm.getValue());