*Please note:* I cannot be sure if this actually helps, since we've not enabled LGTM for the PDF.js repository[1], however I hope that it should stop LGTM reporting things that we're already using ESLint to enforce.
---
[1] In case the patch does nothing, we can simply revert it and move on :-)