Skip to content

Commit

Permalink
Upgrade: esquery@1.2.0 (#13076)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Mar 24, 2020
1 parent 3f7c9bf commit 2111c52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/linter/node-event-generator.js
Expand Up @@ -159,8 +159,8 @@ function tryParseSelector(rawSelector) {
try {
return esquery.parse(rawSelector.replace(/:exit$/u, ""));
} catch (err) {
if (typeof err.offset === "number") {
throw new SyntaxError(`Syntax error in selector "${rawSelector}" at position ${err.offset}: ${err.message}`);
if (err.location && err.location.start && typeof err.location.start.offset === "number") {
throw new SyntaxError(`Syntax error in selector "${rawSelector}" at position ${err.location.start.offset}: ${err.message}`);
}
throw err;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -56,7 +56,7 @@
"eslint-utils": "^2.0.0",
"eslint-visitor-keys": "^1.1.0",
"espree": "^6.2.1",
"esquery": "^1.0.1",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Expand Up @@ -42,5 +42,8 @@ module.exports = {
}
]
},
resolve: {
mainFields: ["main", "module"]
},
stats: "errors-only"
};

0 comments on commit 2111c52

Please sign in to comment.