Closed lassipulkkinen closed 2 years ago
I don't write much JS these days anymore (mostly typescript, and therefore a different plugin altogether). That said though, it looks like you put some good effort into this. I'll go ahead and merge it, although I don't really have time to test it, so I'll keep an eye out and may revert if there are issues, or if you could also keep an eye out and submit any follow ups if there are issues, that would be helpful as well!
Thanks! I've been using this for the past few weeks and haven't encountered any issues, although obviously I did just force-push to fix a dumb typo, so there could be more..?
I won't necessarily be writing much JS in the near future either, though, as I kind of ended up abandoning the project I was working on when I submitted this.
Restricts usage of
jsAll
to contexts where statements are allowed. This makes it possible to addjsBlock
tojsAll
(fixes #1228), which is also done here.This also splits
jsRepeatParen
intojsWhileParen
andjsForParen
, since the syntaxes are obviously very different, and restrictsof
tojsForParen
, since that's the only place where it actually has special meaning (this is still a bit crude, as it doesn't differentiate for-of from for...). Somehow miraculously there was already a highlighting rule forjsOf
, so that didn't need to be added.