diff --git a/edit/linter-report.js b/edit/linter-report.js index 69369104..b74bcf98 100644 --- a/edit/linter-report.js +++ b/edit/linter-report.js @@ -10,7 +10,7 @@ Object.assign(linter, (() => { $('#lint-help').addEventListener('click', helpDialog.show); }, {once: true}); - linter.onChange((annotationsNotSorted, annotations, cm) => { + linter.onLintingUpdated((annotationsNotSorted, annotations, cm) => { let table = cms.get(cm); if (!table) { table = createTable(cm); diff --git a/edit/linter.js b/edit/linter.js index eb243c87..5cb7f779 100644 --- a/edit/linter.js +++ b/edit/linter.js @@ -2,7 +2,7 @@ // eslint-disable-next-line no-var var linter = (() => { - const changeListeners = []; + const lintingUpdatedListeners = []; const unhookListeners = []; const linters = []; const cms = new Set(); @@ -12,7 +12,7 @@ var linter = (() => { run, enableForEditor, disableForEditor, - onChange, + onLintingUpdated, onUnhook }; @@ -20,12 +20,12 @@ var linter = (() => { unhookListeners.push(cb); } - function onChange(cb) { - changeListeners.push(cb); + function onLintingUpdated(cb) { + lintingUpdatedListeners.push(cb); } function onUpdateLinting(...args) { - for (const cb of changeListeners) { + for (const cb of lintingUpdatedListeners) { cb(...args); } }