I've added a bit to the Cockpit Coding Guidelines about AMD modules:
https://github.com/cockpit-project/cockpit/wiki/Cockpit-Coding-Guidelines
Some of us were discussing AMD modules [1] with global side-effects.
Normally this would be frowned on, but in real life this comes up all
the time.
We decided that because of our component system, we would allow
side-effects, with the caveat:
"Modules that return API (as above) should avoid global side-effects.
And modules that have global side-effects should not return or define API."
Hope that makes sense,
Stef
[1]
https://github.com/amdjs/amdjs-api/wiki/AMD
http://dojotoolkit.org/documentation/tutorials/1.10/modules/index.html