Some implementations get a bit weird about how they report the error - it is probably a missing semicolon from the preceding code block (ie. a few lines above the location it's reporting). Try running the same code through another instance of eslint, eg. eslint.org/demo to see if you get the same error. Plus do a manual check through the preceding code block to see if you can spot it yourself.