jsonc-eslint-parser
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -206,9 +206,7 @@ "use strict"; | ||
function normalizeEcmaVersion(espree, version) { | ||
const latestEcmaVersion = getLatestEcmaVersion(espree); | ||
if (version == null || version === "latest") { | ||
return getLatestEcmaVersion(espree); | ||
return latestEcmaVersion; | ||
} | ||
if (version > 5 && version < 2015) { | ||
return version + 2009; | ||
} | ||
return version; | ||
return Math.min(getEcmaVersionYear(version), latestEcmaVersion); | ||
} | ||
@@ -227,3 +225,6 @@ function getLatestEcmaVersion(espree) { | ||
} | ||
return normalizeEcmaVersion(espree, espree.latestEcmaVersion); | ||
return getEcmaVersionYear(espree.latestEcmaVersion); | ||
} | ||
function getEcmaVersionYear(version) { | ||
return version > 5 && version < 2015 ? version + 2009 : version; | ||
} |
{ | ||
"name": "jsonc-eslint-parser", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "JSON, JSONC and JSON5 parser for use with ESLint plugins", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
61303
1351