Skip to content

Commit 0263be4

Browse files
committed
memo-parser: require eslint >= 3.5.0 (need file path always)
fixes #862, #863
1 parent b1eeade commit 0263be4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

memo-parser/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ const parserOptions = {
1717
}
1818

1919
exports.parse = function parse(content, options) {
20-
// them defaults yo
2120
options = Object.assign({}, options, parserOptions)
2221

22+
if (!options.filePath) {
23+
throw new Error("no file path provided!")
24+
}
25+
2326
const keyHash = crypto.createHash('sha256')
2427
keyHash.update(content)
2528
hashObject(options, keyHash)

memo-parser/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "memo-parser",
33
"version": "0.1.0",
4-
"engines": { "node": ">=4" },
4+
"engines": {
5+
"node": ">=4"
6+
},
57
"description": "Memoizing wrapper for any ESLint-compatible parser module.",
68
"main": "index.js",
79
"scripts": {
@@ -21,5 +23,8 @@
2123
"bugs": {
2224
"url": "https://github.com/benmosher/eslint-plugin-import/issues"
2325
},
24-
"homepage": "https://github.com/benmosher/eslint-plugin-import#readme"
26+
"homepage": "https://github.com/benmosher/eslint-plugin-import#readme",
27+
"peerDependencies": {
28+
"eslint": ">=3.5.0"
29+
}
2530
}

0 commit comments

Comments
 (0)