-
Notifications
You must be signed in to change notification settings - Fork 199
convert mocha-avoid-only rule to use walk function #688
convert mocha-avoid-only rule to use walk function #688
Conversation
ctx.addFailureAt(node.getStart(), text.length, Rule.FAILURE_STRING_CONTEXT); | ||
break; | ||
|
||
default: // required per tslint rules for switch statements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally went with the switch
statement over the if/elseif
for clarity. The forced inclusion of default
mars it, admittedly. I can switch to the if/else if
if required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for getting rid of continuous .getText()
calls!
build failure due to #684 😞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for this!
ctx.addFailureAt(node.getStart(), text.length, Rule.FAILURE_STRING_CONTEXT); | ||
break; | ||
|
||
default: // required per tslint rules for switch statements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for getting rid of continuous .getText()
calls!
Build failures are pre-existing, unrelated and only on Node 6. #684 |
PR checklist
walk
function instead of extending AbstractRule #680Overview of change:
Updates the mocha-avoid-only rule to use the walk function.