Comparing version 2.10.3 to 2.11.0-rc1
{ | ||
"name": "jshint", | ||
"version": "2.10.3", | ||
"version": "2.11.0-rc1", | ||
"homepage": "http://jshint.com/", | ||
@@ -24,3 +24,3 @@ "description": "Static analysis tool for JavaScript", | ||
"build": "node bin/build", | ||
"coverage": "istanbul -- cover ./node_modules/nodeunit/bin/nodeunit tests/unit", | ||
"coverage": "istanbul -- cover ./node_modules/nodeunit/bin/nodeunit tests/unit tests/unit/unstable", | ||
"coverage-report": "npm run coverage && istanbul report html", | ||
@@ -38,3 +38,3 @@ "data": "node scripts/generate-identifier-data", | ||
"test-regression": "nodeunit tests/regression", | ||
"test-unit": "nodeunit tests/unit", | ||
"test-unit": "nodeunit tests/unit tests/unit/unstable", | ||
"test": "npm run test-node && npm run test-browser" | ||
@@ -41,0 +41,0 @@ }, |
@@ -871,4 +871,23 @@ /* | ||
if (isAllowedDigit !== isDecimalDigit) { | ||
if (!isLegacy && value.length <= 2) { // 0x | ||
var isBigInt = this.peek(index) === 'n'; | ||
if (isAllowedDigit !== isDecimalDigit || isBigInt) { | ||
if (isBigInt) { | ||
if (!state.option.unstable.bigint) { | ||
this.triggerAsync( | ||
"warning", | ||
{ | ||
code: "W144", | ||
line: this.line, | ||
character: this.char, | ||
data: [ "BigInt", "bigint" ] | ||
}, | ||
checks, | ||
function() { return true; } | ||
); | ||
} | ||
value += char; | ||
index += 1; | ||
} else if (!isLegacy && value.length <= 2) { // 0x | ||
return { | ||
@@ -875,0 +894,0 @@ type: Token.NumericLiteral, |
@@ -1051,2 +1051,5 @@ "use strict"; | ||
* RegExp extensions | ||
* - `10` - To enable language features introduced by ECMAScript | ||
* 10](https://www.ecma-international.org/ecma-262/10.0/index.html). | ||
* Notable additions: optional catch bindings. | ||
*/ | ||
@@ -1063,2 +1066,13 @@ esversion: 5 | ||
exports.unstable = { | ||
/** | ||
* [The BigInt proposal](https://github.com/tc39/proposal-bigint) extends the | ||
* language's grammer for numeric literals to support integer values of | ||
* arbitrary precision. It also introduces a new value of the `typeof` | ||
* operator, "bigint". | ||
* | ||
* Mathematical operations which use both BigInt and traditional ECMAScript | ||
* Number values may not have the intended effect. Due to the weakly-typed | ||
* nature of the language, JSHint is unable to identify such cases. | ||
*/ | ||
bigint: true | ||
}; | ||
@@ -1065,0 +1079,0 @@ |
@@ -42,3 +42,8 @@ /** | ||
*/ | ||
tryClause: 32 | ||
tryClause: 32, | ||
/** | ||
* Enabled when parsing the body of a generator function. | ||
*/ | ||
yield: 64 | ||
}; |
@@ -69,2 +69,11 @@ "use strict"; | ||
/** | ||
* Determine if constructs introduced in ECMAScript 10 should be accepted. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
inES10: function() { | ||
return this.esVersion >= 10; | ||
}, | ||
/** | ||
* Determine if constructs introduced in ECMAScript 9 should be accepted. | ||
@@ -71,0 +80,0 @@ * |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
72278
3671235
1
6