You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Readme lists the available option of the parse function, but doesn't specify the default value for all of them.
From what I gathered fromthe source, it might make sense to update the example of the usage section to the following:
varespree=require("espree");varast=espree.parse(code,{// attach range information to each noderange: false,// attach line/column location information to each nodeloc: false,// create a top-level comments array containing all commentscomment: false,// attach comments to the closest relevant node as leadingComments and// trailingCommentsattachComment: false,// create a top-level tokens array containing all tokenstokens: false,// set to 3, 5 (default), 6, 7, or 8 to specify the version of ECMAScript syntax you want to use. // You can also set to 2015 (same as 6), 2016 (same as 7), or 2017 (same as 8) to use the year-based naming.ecmaVersion: 5,// specify which type of script you're parsing (script or module, default is script)sourceType: "script",// specify additional language featuresecmaFeatures: {// enable JSX parsingjsx: false,// enable return in global scopeglobalReturn: false,// enable implied strict mode (if ecmaVersion >= 5)impliedStrict: false,// allow experimental object rest/spreadexperimentalObjectRestSpread: false}});
The text was updated successfully, but these errors were encountered:
Sorry for the delay in responding to this. I think this change makes sense - how could we make it clear these are the default values? And would you be willing to make a PR?
The Readme lists the available option of the
parse
function, but doesn't specify the default value for all of them.From what I gathered from the source, it might make sense to update the example of the usage section to the following:
The text was updated successfully, but these errors were encountered: