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
Copy file name to clipboardExpand all lines: packages/parser/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ interface ParserOptions {
53
53
jsx?:boolean;
54
54
globalReturn?:boolean;
55
55
};
56
-
ecmaVersion?:number;
56
+
ecmaVersion?:number|'latest';
57
57
58
58
jsxPragma?:string|null;
59
59
jsxFragmentName?:string|null;
@@ -97,12 +97,13 @@ This options allows you to tell the parser if you want to allow global `return`
97
97
98
98
Default `2018`.
99
99
100
-
Accepts any valid ECMAScript version number:
100
+
Accepts any valid ECMAScript version number or `'latest'`:
101
101
102
-
- A version: es3, es5, es6, es7, es8, es9, es10, es11, ..., or
103
-
- A year: es2015, es2016, es2017, es2018, es2019, es2020, ...
102
+
- A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, ..., or
103
+
- A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, ..., or
104
+
-`'latest'`
104
105
105
-
The value **must** be a number - so do not include the `es` prefix.
106
+
When it's a version or a year, the value **must** be a number - so do not include the `es` prefix.
106
107
107
108
Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
0 commit comments