Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 28, 2024
1 parent 4ad5e09 commit 7060018
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/keyword-add-array/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export default function keywordAddArray(Parser) {
oldParenAssign = refDestructuringErrors.parenthesizedAssign;
oldTrailingComma = refDestructuringErrors.trailingComma;
oldDoubleProto = refDestructuringErrors.doubleProto;
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
refDestructuringErrors.parenthesizedAssign = -1;
refDestructuringErrors.trailingComma = -1;
} else {
refDestructuringErrors = new DestructuringErrors();
ownDestructuringErrors = true;
Expand All @@ -61,8 +62,11 @@ export default function keywordAddArray(Parser) {
if (this.type === tt.eq)
left = this.toAssignable(left, false, refDestructuringErrors);

if (!ownDestructuringErrors)
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
if (!ownDestructuringErrors) {
refDestructuringErrors.parenthesizedAssign = -1;
refDestructuringErrors.trailingComma = -1;
refDestructuringErrors.doubleProto = -1;
}

if (refDestructuringErrors.shorthandAssign >= left.start)
refDestructuringErrors.shorthandAssign = -1;
Expand Down

0 comments on commit 7060018

Please sign in to comment.