Skip to content

Commit

Permalink
replace Object.values with object.values
Browse files Browse the repository at this point in the history
  • Loading branch information
rfermann committed Jul 17, 2019
1 parent f6d83b2 commit 5056f5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"has": "^1.0.3",
"lodash": "^4.17.11",
"minimatch": "^3.0.4",
"object.values": "^1.1.0",
"read-pkg-up": "^2.0.0",
"resolve": "^1.11.0"
},
Expand Down
3 changes: 2 additions & 1 deletion src/rules/no-unused-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import resolve from 'eslint-module-utils/resolve'
import docsUrl from '../docsUrl'
import { dirname, join } from 'path'
import readPkgUp from 'read-pkg-up'
import values from 'object.values'

// eslint/lib/util/glob-util has been moved to eslint/lib/util/glob-utils with version 5.3
// and has been moved to eslint/lib/cli-engine/file-enumerator in version 6
Expand Down Expand Up @@ -214,7 +215,7 @@ const fileIsInPkg = file => {
}

const checkPkgFieldObject = pkgField => {
const pkgFieldFiles = Object.values(pkgField).map(value => join(basePath, value))
const pkgFieldFiles = values(pkgField).map(value => join(basePath, value))
if (pkgFieldFiles.includes(file)) {
return true
}
Expand Down

0 comments on commit 5056f5b

Please sign in to comment.