Comparing version 1.7.1 to 1.8.0
@@ -55,2 +55,25 @@ /** | ||
/** | ||
* Create an Arrow Function Expression ASTNode | ||
* @param {ASTNode} params The function arguments | ||
* @param {ASTNode} defaults Any default arguments | ||
* @param {ASTNode} body The function body | ||
* @param {boolean} expression True if the arrow function is created via an expression. | ||
* Always false for declarations, but kept here to be in sync with | ||
* FunctionExpression objects. | ||
* @returns {ASTNode} An ASTNode representing the entire arrow function expression | ||
*/ | ||
createArrowFunctionExpression: function (params, defaults, body, expression) { | ||
return { | ||
type: astNodeTypes.ArrowFunctionExpression, | ||
id: null, | ||
params: params, | ||
defaults: defaults, | ||
body: body, | ||
rest: null, | ||
generator: false, | ||
expression: expression | ||
}; | ||
}, | ||
/** | ||
* Create an ASTNode representation of an assignment expression | ||
@@ -57,0 +80,0 @@ * @param {ASTNode} operator The assignment operator |
@@ -43,2 +43,3 @@ /** | ||
ArrayExpression: "ArrayExpression", | ||
ArrowFunctionExpression: "ArrowFunctionExpression", | ||
BlockStatement: "BlockStatement", | ||
@@ -45,0 +46,0 @@ BinaryExpression: "BinaryExpression", |
@@ -43,2 +43,5 @@ /** | ||
// enable parsing of arrow functions | ||
arrowFunctions: false, | ||
// enable parsing of let and const | ||
@@ -86,4 +89,10 @@ blockBindings: true, | ||
// enable super in functions | ||
superInFunctions: false, | ||
// React JSX parsing | ||
jsx: false | ||
jsx: false, | ||
// allow return statement in global scope | ||
globalReturn: false | ||
}; |
@@ -11,3 +11,3 @@ { | ||
}, | ||
"version": "1.7.1", | ||
"version": "1.8.0", | ||
"files": [ | ||
@@ -14,0 +14,0 @@ "bin", |
@@ -62,2 +62,5 @@ # Espree | ||
// enable parsing of arrow functions | ||
arrowFunctions: true, | ||
// enable parsing of let/const | ||
@@ -105,4 +108,7 @@ blockBindings: true, | ||
// React JSX parsing | ||
jsx: true | ||
// enable React JSX parsing | ||
jsx: true, | ||
// enable return in global scope | ||
globalReturn: true | ||
} | ||
@@ -109,0 +115,0 @@ }); |
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
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
269675
6809
207