Google announced in a blog post:
Gmail currently restricts certain file attachments (e.g. .exe, .msc, and .bat) for security reasons, and starting on February 13, 2017, we will not allow .js file attachments as well. Similar to other restricted file attachments, you will not be able to attach a .js file and an in-product warning will appear, explaining the reason why.
The move also expands the current list of banned file attachments in Gmail, which includes .ade, .cmd, and .lib, among others. Cyber criminals have been using these file types to distribute malware via email over the last couple of years.