eslint/eslint — pull request #943 by jrajav (2014-05-30 14:03:56+00:00)
Title: Fix: Corrects configs merging into base config (Fixes #838)

Fixes #838

Took a while to track down but I found the problem causing #838. The baseConfig object was actually being used as the main config that new configs would write into, and retained over multiple runs of `getConfig()` - it seems that someone might have thought that `Object.create(this.baseConfig)` deep clones a new object based on the properties of `this.baseConfig`, when in fact it creates a new object with `this.baseConfig` as the prototype. Each subsequent `mergeConfig` was actually overwriting properties on `this.baseConfig`, which is why the .eslintrc from b/ was being used as the config for all subsequent lintings even when b/ was exited.

A better solution to this might be to just use underscore/lodash _.extend instead of `mergeConfigs()` in lib/util.js, but I didn't attempt that for this fix because I'm not sure of all the implications or `mergeConfigs()`'s logic.

Further comments inline with the commit.