utils/module-require.js
function createModule(filename) {
  const mod = new Module(filename)
  mod.filename = filename
  mod.paths = Module._nodeModulePaths(path.dirname(filename))
  return mod
}
function createModule(filename) {
  const mod = new Module(filename)
  mod.filename = filename
  mod.paths = Module._nodeModulePaths(path.dirname(filename))
  return mod
}
function createModule ( filename ) { const mod = new Module ( filename ) mod . filename = filename mod . paths = Module . _nodeModulePaths ( path . dirname ( filename ) ) return mod }
borrowed from babel-eslint
borrowed from babel - eslint