Fix: some shadowing

This commit is contained in:
eight 2018-09-02 14:32:39 +08:00
parent 38d0a2835c
commit 0d9e1368b4

View File

@ -43,8 +43,8 @@ var linter = (() => {
} }
} }
function register(getAnnotations) { function register(linterFn) {
linters.push(getAnnotations); linters.push(linterFn);
} }
function run() { function run() {
@ -55,7 +55,7 @@ var linter = (() => {
function getAnnotations(...args) { function getAnnotations(...args) {
const result = []; const result = [];
return Promise.all(linters.map(getAnnotations => getAnnotations(...args))) return Promise.all(linters.map(fn => fn(...args)))
.then(results => { .then(results => {
for (const annotations of results) { for (const annotations of results) {
if (annotations) { if (annotations) {