The coding style of the service nodes is different from that in MediaWiki core. Given it's confusing to switch between coding styles I'd recommend adding eslint or jscs to the service template which will enforce and autofix a lot of these.
Topic on Talk:Service-template-node/GettingStarted
Appearance
See https://gerrit.wikimedia.org/r/#/c/320802/ - we could have avoided this exchange altogether and saved time had it been in the repo!