I know some modders would kill me because of this request, but ill post anyway.
Maybe to prevent confusion with native Forge mods the mod could load the JS mods from another folder at the root of the game profile (eg.: jsmods or even "plugins"), and each mod would consist of a zipped (or not) folder with the .js files in the root, and the structure of a resource/datapack (because every standard mod is both too).
Projects with concept similar, but for older versions of Minecraft:
I have no idea
Sorry i have not familiar this topic.