Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonc-eslint-parser

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonc-eslint-parser - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

13

lib/parser/parser.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc