-
Notifications
You must be signed in to change notification settings - Fork 887
visitCallExpression not traversing through all calls #4296
Comments
Hey @cyberhck - exciting that you're working on your own linting rule, but this post is a little unclear on problem you're facing. Are you saying that If it's a bug in If it's a bug in |
I'm saying I used If you see there, I'm using This languageRule is for our internal purpose only, but the thing it's supposed to detect is working everywhere except if it's inside a callback. Looking at #2341 , looks like it also changed from using is If I use walker instead of |
That's probably because you're
Yup! This is preferred. Although Search for Closing this as it's working as intended. Thanks for posting! |
so you're saying, |
Ha, no worries - this stuff isn't documented very heavily. As long as |
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
Passes
Expected behavior
Fails
But if I change the code for linting to:
It does fail.
I came across this while working on my own linting rule having a bug, turns out
visitCallExpression
doesn't call for anything inside a callback for some reason.As of now we've to use normal walker and visit each child of a source file, which might result it in being slow.
I'm not sure if it's limitation of tslint, or typescript not reporting it or something, I'm not even sure if it's known to tslint team.
Please let me know if this is something tslint will be working on? Or is it actually not possible with
visitCallExpression
?Other rules such as
no-console
actually works because they go through each child.I did go to AST explorer, and it shows CallExpression.
The text was updated successfully, but these errors were encountered: