lint: fix lint issues
This commit is contained in:
parent
f0b5109689
commit
b49b889c61
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue