Fix: linter.onChange -> linter.onLintingUpdated
This commit is contained in:
parent
2fb2eb6d91
commit
09bd6218e0
|
@ -10,7 +10,7 @@ Object.assign(linter, (() => {
|
||||||
$('#lint-help').addEventListener('click', helpDialog.show);
|
$('#lint-help').addEventListener('click', helpDialog.show);
|
||||||
}, {once: true});
|
}, {once: true});
|
||||||
|
|
||||||
linter.onChange((annotationsNotSorted, annotations, cm) => {
|
linter.onLintingUpdated((annotationsNotSorted, annotations, cm) => {
|
||||||
let table = cms.get(cm);
|
let table = cms.get(cm);
|
||||||
if (!table) {
|
if (!table) {
|
||||||
table = createTable(cm);
|
table = createTable(cm);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// eslint-disable-next-line no-var
|
// eslint-disable-next-line no-var
|
||||||
var linter = (() => {
|
var linter = (() => {
|
||||||
const changeListeners = [];
|
const lintingUpdatedListeners = [];
|
||||||
const unhookListeners = [];
|
const unhookListeners = [];
|
||||||
const linters = [];
|
const linters = [];
|
||||||
const cms = new Set();
|
const cms = new Set();
|
||||||
|
@ -12,7 +12,7 @@ var linter = (() => {
|
||||||
run,
|
run,
|
||||||
enableForEditor,
|
enableForEditor,
|
||||||
disableForEditor,
|
disableForEditor,
|
||||||
onChange,
|
onLintingUpdated,
|
||||||
onUnhook
|
onUnhook
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,12 +20,12 @@ var linter = (() => {
|
||||||
unhookListeners.push(cb);
|
unhookListeners.push(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onChange(cb) {
|
function onLintingUpdated(cb) {
|
||||||
changeListeners.push(cb);
|
lintingUpdatedListeners.push(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUpdateLinting(...args) {
|
function onUpdateLinting(...args) {
|
||||||
for (const cb of changeListeners) {
|
for (const cb of lintingUpdatedListeners) {
|
||||||
cb(...args);
|
cb(...args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user