I’m getting started with Stimulus. I’m loving it since I have the feeling it hits the sweet spot on helping me organize the JS sprinkles I want to add to my projects in an elegant way, without having to add a complex framework (plus easy turbolinks compatibility).
I do have a question regarding the Controller’s targets array. I’m getting the following error from JSHint on that line:
E054 - Class properties must be methods. Expected '(' but instead saw '='.
I understand the intention from the handbook explanation of the targets array. But while looking for a way to get rid of this linter error I found this blog post saying this syntax is an ES7 proposal (?).
My question is whether or not anyone has dealt with this using JSHint? Because the JSHint project doesn’t support options to ignore errors I guess there’s nothing to do but deal with that error message on screen (JSHint lints for me since I use Atom).
Appreciate any advice, thanks!