Comparing version 9.1.0 to 9.2.0
@@ -95,3 +95,12 @@ /** | ||
const locations = options.loc === true; | ||
const allowReserved = ecmaVersion === 3 ? "never" : false; | ||
if (ecmaVersion !== 3 && options.allowReserved) { | ||
// a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed | ||
throw new Error("`allowReserved` is only supported when ecmaVersion is 3"); | ||
} | ||
if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") { | ||
throw new Error("`allowReserved`, when present, must be `true` or `false`"); | ||
} | ||
const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false; | ||
const ecmaFeatures = options.ecmaFeatures || {}; | ||
@@ -98,0 +107,0 @@ const allowReturnOutsideFunction = options.sourceType === "commonjs" || |
@@ -1,3 +0,3 @@ | ||
const version = "9.1.0"; | ||
const version = "9.2.0"; | ||
export default version; |
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "9.1.0", | ||
"version": "9.2.0", | ||
"files": [ | ||
@@ -22,0 +22,0 @@ "lib", |
@@ -40,3 +40,3 @@ [![npm version](https://img.shields.io/npm/v/espree.svg)](https://www.npmjs.com/package/espree) | ||
- `code` [string]() - the code which needs to be parsed. | ||
- `code` [string]() - the code which needs to be parsed. | ||
- `options (Optional)` [Object]() - read more about this [here](#options). | ||
@@ -85,3 +85,3 @@ | ||
- `code` [string]() - the code which needs to be parsed. | ||
- `code` [string]() - the code which needs to be parsed. | ||
- `options (Optional)` [Object]() - read more about this [here](#options). | ||
@@ -129,3 +129,3 @@ | ||
## Options | ||
## Options | ||
@@ -146,7 +146,9 @@ ```js | ||
// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, or 12 to specify the version of ECMAScript syntax you want to use. | ||
// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, or 13 to specify the version of ECMAScript syntax you want to use. | ||
// You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), or 2022 (same as 13) to use the year-based naming. | ||
// You can also set "latest" to use the most recently supported version. | ||
ecmaVersion: 5, | ||
ecmaVersion: 3, | ||
allowReserved: true, // only allowed when ecmaVersion is 3 | ||
// specify which type of script you're parsing ("script", "module", or "commonjs") | ||
@@ -246,2 +248,3 @@ sourceType: "script", | ||
* [Class static initialization blocks](https://github.com/tc39/proposal-class-static-block) | ||
* [Ergonomic brand checks for Private Fields](https://github.com/tc39/proposal-private-fields-in-in) | ||
@@ -248,0 +251,0 @@ See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized. |
Sorry, the diff of this file is not supported yet
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
83177
1709
251