revert lint code (#151)
This commit is contained in:
parent
1dafe3a8e9
commit
c6e1d1c906
1 changed files with 9 additions and 11 deletions
|
@ -49,8 +49,7 @@ 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) {
|
||||||
|
@ -60,8 +59,7 @@ class Editor extends React.Component {
|
||||||
if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
|
if (this.props.lintMessages.length > 0 && this.props.lintWarning) {
|
||||||
this.beep.play();
|
this.beep.play();
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue