marijnh/tern — pull request #243 by ypresto (2013-09-23 17:12:44+00:00)
Title: Add restrictedGlobals option

Keep from undesirable global variable assignment by configuration.

For example, underscore.string redefines "window._" if it is undefined, to
assign "window._.str".

if (typeof root._ !== "undefined") {
...
} else {
root._ = { str : ... };
}

Inference engine thinks "window._" assigned twice in this case. For
workaround, manually restricts global assignment to specific file by below
config.

"restrictedGlobals" : {
"_" : "lib/underscore.js"
}

(Also accepts list of filenames.)

I found {"libs" : "underscore"} config works fine.
But I'm sending this request because perhaps there are other modules
affects, or some one want to use the real module to follow latest /
remain legacy one.

Thank you for creating great product :)