Skip to content

Commit

Permalink
Change to 7.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo committed Jul 30, 2020
1 parent d682574 commit 3352d50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eslint/babel-eslint-parser/src/index.js
Expand Up @@ -15,7 +15,9 @@ import visitorKeys from "./visitor-keys";
let isRunningMinSupportedCoreVersion = null;

function baseParse(code, options) {
const minSupportedCoreVersion = ">=7.0.0";
// Ensure we're using a version of `@babel/core` that includes `parse()` and `tokTypes`.
// https://github.com/babel/babel/pull/8986
const minSupportedCoreVersion = ">=7.2.0";

if (typeof isRunningMinSupportedCoreVersion !== "boolean") {
isRunningMinSupportedCoreVersion = semver.satisfies(
Expand All @@ -24,7 +26,6 @@ function baseParse(code, options) {
);
}

// Ensure we're using a version of `@babel/core` that includes the `parse()` API.
if (!isRunningMinSupportedCoreVersion) {
throw new Error(
`@babel/eslint-parser@${packageJson.version} does not support @babel/core@${babelCoreVersion}. Please upgrade to @babel/core@${minSupportedCoreVersion}`,
Expand Down

0 comments on commit 3352d50

Please sign in to comment.