Skip to content

Commit

Permalink
memo-parser: require eslint >= 3.5.0 (need file path always)
Browse files Browse the repository at this point in the history
fixes #862, #863
  • Loading branch information
benmosher committed Jun 22, 2017
1 parent b1eeade commit 0263be4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion memo-parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ const parserOptions = {
}

exports.parse = function parse(content, options) {
// them defaults yo
options = Object.assign({}, options, parserOptions)

if (!options.filePath) {
throw new Error("no file path provided!")
}

const keyHash = crypto.createHash('sha256')
keyHash.update(content)
hashObject(options, keyHash)
Expand Down
9 changes: 7 additions & 2 deletions memo-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "memo-parser",
"version": "0.1.0",
"engines": { "node": ">=4" },
"engines": {
"node": ">=4"
},
"description": "Memoizing wrapper for any ESLint-compatible parser module.",
"main": "index.js",
"scripts": {
Expand All @@ -21,5 +23,8 @@
"bugs": {
"url": "https://github.com/benmosher/eslint-plugin-import/issues"
},
"homepage": "https://github.com/benmosher/eslint-plugin-import#readme"
"homepage": "https://github.com/benmosher/eslint-plugin-import#readme",
"peerDependencies": {
"eslint": ">=3.5.0"
}
}

0 comments on commit 0263be4

Please sign in to comment.