Since I've received zero answers on this one, I've assumed there was no way to do that.
I'm sure there is a way, but I just had no time to investigate this week. Sorry.
I believe the "internal linter" is a SpiderMonkey thing, not GJS, so it would be more a question of whether GJS would accept a patch to disable it.
...aaaand I found the answer in scarcely more time than it took me to reply to your email :-)
GJS_DISABLE_EXTRA_WARNINGS=1 gjs myprogram.js
It is indeed a SpiderMonkey feature that GJS turns on by default. Still, it would be nice to disable it per file or something.
Regards,
Philip