Debugging parse errors in JS is literally the worst. I’ve done some searching, and I’ve not found any particularly well-established techniques for effectively flushing out your JS bugs, aside from the super-annoying, “When you have enough experience, you just know where to start looking”.
Right. Cool story.
In my present state of newness, I have two somewhat unreliable, but well-defined techniques.
The first is to
ag my way through the codebase in an effort to information-gather. This doesn’t often solve the parse error, but it helps me get the larger context, which is usually important.