Skip to content

Commit

Permalink
explicit object-assign polyfill for node < 4
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Nov 26, 2015
1 parent 071f6b8 commit c183a39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions resolvers/node/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var resolve = require('resolve')
, path = require('path')
, assign = require('object-assign')

exports.resolveImport = function resolveImport(source, file, settings) {
if (resolve.isCore(source)) return null
Expand All @@ -9,9 +10,9 @@ exports.resolveImport = function resolveImport(source, file, settings) {

function opts(basedir, settings) {
// pulls all items from 'import/resolve'
return Object.assign( {}
, settings && settings['import/resolve']
, { basedir: basedir }
)
return assign( {}
, settings && settings['import/resolve']
, { basedir: basedir }
)
}

1 change: 1 addition & 0 deletions resolvers/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"homepage": "https://github.com/benmosher/eslint-plugin-import",
"dependencies": {
"object-assign": "^4.0.1",
"resolve": "^1.1.6"
}
}

0 comments on commit c183a39

Please sign in to comment.