Skip to content

Commit

Permalink
replaced Object.prototype.hasOwnProperty usage with has module
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Hargrove committed Feb 7, 2018
1 parent 980b087 commit 77d4423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rules/no-extraneous-dependencies.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from 'path'
import fs from 'fs'
import has from 'has'
import readPkgUp from 'read-pkg-up'
import minimatch from 'minimatch'
import resolve from 'eslint-module-utils/resolve'
Expand Down Expand Up @@ -30,7 +31,7 @@ function getDependencies(context, packageDir) {
peerDependencies: {},
}

if (Object.prototype.hasOwnProperty.call(context.settings, 'import/paths')) {
if (has(context.settings, 'import/paths')) {
paths.push(
...context.settings['import/paths']
.map((dir) => path.resolve(dir))
Expand Down

0 comments on commit 77d4423

Please sign in to comment.