@babel/eslint-parser
Advanced tools
Comparing version 7.13.4 to 7.13.8
@@ -325,3 +325,3 @@ "use strict"; | ||
_checkIdentifierOrVisit(node) { | ||
if (node == null ? void 0 : node.typeAnnotation) { | ||
if (node != null && node.typeAnnotation) { | ||
this._visitTypeAnnotation(node.typeAnnotation); | ||
@@ -328,0 +328,0 @@ } else if ((node == null ? void 0 : node.type) === "Identifier") { |
@@ -32,5 +32,21 @@ "use strict"; | ||
function getParserPlugins(babelOptions) { | ||
var _babelOptions$parserO, _babelOptions$parserO2; | ||
const babelParserPlugins = (_babelOptions$parserO = (_babelOptions$parserO2 = babelOptions.parserOpts) == null ? void 0 : _babelOptions$parserO2.plugins) != null ? _babelOptions$parserO : []; | ||
const estreeOptions = { | ||
classFeatures: false | ||
}; | ||
for (const plugin of babelParserPlugins) { | ||
if (Array.isArray(plugin) && plugin[0] === "estree") { | ||
Object.assign(estreeOptions, plugin[1]); | ||
break; | ||
} | ||
} | ||
return [["estree", estreeOptions], ...babelParserPlugins]; | ||
} | ||
function normalizeBabelParseConfig(options) { | ||
var _options$babelOptions, _options$babelOptions2; | ||
const parseOptions = Object.assign({ | ||
@@ -45,5 +61,3 @@ sourceType: options.sourceType, | ||
}, options.babelOptions.parserOpts, { | ||
plugins: [["estree", { | ||
classFeatures: false | ||
}], ...((_options$babelOptions = (_options$babelOptions2 = options.babelOptions.parserOpts) == null ? void 0 : _options$babelOptions2.plugins) != null ? _options$babelOptions : [])], | ||
plugins: getParserPlugins(options.babelOptions), | ||
ranges: true, | ||
@@ -50,0 +64,0 @@ tokens: true |
@@ -43,3 +43,3 @@ "use strict"; | ||
if (node == null ? void 0 : node.loc.identifierName) { | ||
if (node != null && node.loc.identifierName) { | ||
delete node.loc.identifierName; | ||
@@ -46,0 +46,0 @@ } |
@@ -33,3 +33,3 @@ "use strict"; | ||
if (!isRunningMinSupportedCoreVersion) { | ||
throw new Error(`@babel/eslint-parser@${"7.13.4"} does not support @babel/core@${_core.version}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`); | ||
throw new Error(`@babel/eslint-parser@${"7.13.8"} does not support @babel/core@${_core.version}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`); | ||
} | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "@babel/eslint-parser", | ||
"version": "7.13.4", | ||
"version": "7.13.8", | ||
"description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", | ||
@@ -35,6 +35,6 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"eslint-visitor-keys": "^1.3.0", | ||
"semver": "7.0.0" | ||
"semver": "^6.3.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.13.1", | ||
"@babel/core": "7.13.8", | ||
"dedent": "^0.7.0", | ||
@@ -41,0 +41,0 @@ "eslint": "^7.5.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32881
702
- Removedsemver@7.0.0(transitive)
Updatedsemver@^6.3.0