title: Electron variables defined in renderer are incorrectly available in imported modules
body: <p>I am currently transitioning a script I made in Node.js to Electron. However, I am encountering a problem with variable scope. Variables defined in my Node.js script are not available in my modules unless they are passed or assigned. However, in electron if I declare a variable it will be available in all of my modules without passing or assigning it. For example this Node.js script will correctly fail:</p>
  
  <pre><code>// index.js
  var myModule = require('./src/myModule.js');
  var myString = 'string';
  myModule.run();
  
  // myModule.js
  exports.run = function() {
      console.log(myString); // Correctly says myString is undefined because it is not declared in myModule.js
  }
  </code></pre>
  
  <p>However, the same code in Electron will print the variable defined in <code>renderer.js</code>:</p>
  
  <pre><code>// renderer.js
  var myModule = require('./src/myModule.js');
  var myString = 'string';
  myModule.run();
  
  // myModule.js
  exports.run = function() {
      console.log(myString); // Prints 'string' even though it is not declared in myModule.js
  }
  </code></pre>
  
  <p>How can I prevent the variables defined in <code>renderer.js</code> from being available in my modules. I find it makes it very easy for me to create unorganized code.</p>