RequireJS allows you to pass configuration options by assigning to global variable require
before RequireJS is loaded. This form of passing config may not work with third-party module loaders such as Almond, however.
In other cases, overwriting require
is probably an error, and should be avoided.
The following patterns are considered warnings:
var require = {
/* ... config ... */
};
window.require = {
/* ... config ... */
}
The following pattern is not a warning:
// Not a potential overwrite
foo.require = 'bar';
If you aren't using a third-party module loader and you wish to pass configuration this way, then it is safe to disable this rule.