revert lint code (#151)

This commit is contained in:
Mathura MG 2016-10-17 22:58:30 -04:00 committed by Cassie Tarakajian
parent 1dafe3a8e9
commit c6e1d1c906

View file

@ -49,19 +49,17 @@ class Editor extends React.Component {
gutters: ['CodeMirror-lint-markers'], gutters: ['CodeMirror-lint-markers'],
keyMap: 'sublime', keyMap: 'sublime',
lint: { lint: {
onUpdateLinting: () => { onUpdateLinting: debounce(2000, (annotations) => {
debounce(2000, (annotations) => { this.props.clearLintMessage();
this.props.clearLintMessage(); annotations.forEach((x) => {
annotations.forEach((x) => { if (x.from.line > -1) {
if (x.from.line > -1) { this.props.updateLintMessage(x.severity, (x.from.line + 1), x.message);
this.props.updateLintMessage(x.severity, (x.from.line + 1), x.message);
}
});
if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
this.beep.play();
} }
}); });
} if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
this.beep.play();
}
})
} }
}); });