revert lint code (#151)
This commit is contained in:
parent
1dafe3a8e9
commit
c6e1d1c906
1 changed files with 9 additions and 11 deletions
|
@ -49,19 +49,17 @@ class Editor extends React.Component {
|
|||
gutters: ['CodeMirror-lint-markers'],
|
||||
keyMap: 'sublime',
|
||||
lint: {
|
||||
onUpdateLinting: () => {
|
||||
debounce(2000, (annotations) => {
|
||||
this.props.clearLintMessage();
|
||||
annotations.forEach((x) => {
|
||||
if (x.from.line > -1) {
|
||||
this.props.updateLintMessage(x.severity, (x.from.line + 1), x.message);
|
||||
}
|
||||
});
|
||||
if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
|
||||
this.beep.play();
|
||||
onUpdateLinting: debounce(2000, (annotations) => {
|
||||
this.props.clearLintMessage();
|
||||
annotations.forEach((x) => {
|
||||
if (x.from.line > -1) {
|
||||
this.props.updateLintMessage(x.severity, (x.from.line + 1), x.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
|
||||
this.beep.play();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue