1
0
Fork 0

lint: fix lint issues

This commit is contained in:
ssube 2019-11-09 18:01:40 -06:00 committed by Sean Sube
parent f0b5109689
commit b49b889c61
2 changed files with 9 additions and 11 deletions

View File

@ -205,8 +205,8 @@ export async function visitRules(ctx: VisitorContext, rules: Array<Rule>, data:
let itemIndex = 0;
for (const item of items) {
ctx.visitData = {
itemIndex,
rule,
itemIndex,
rule,
};
const itemResult = cloneDeep(item);
const ruleResult = await rule.visit(ctx, itemResult);

View File

@ -67,15 +67,13 @@ export class VisitorContext implements VisitorContextOptions, VisitorResult {
public mergeResult(other: VisitorResult, data: any = {}): this {
this.changeBuffer.push(...other.changes);
this.errorBuffer.push(...other.errors.map((err) => {
return {
...err,
data: {
...err.data,
...data,
},
};
}));
this.errorBuffer.push(...other.errors.map((err) => ({
...err,
data: {
...err.data,
...data,
},
})));
return this;
}