Skip to content

Commit

Permalink
Change to default to ecmaVersion: 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 19, 2023
1 parent 043c5f9 commit 229b023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev/lib/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property {Acorn | null | undefined} [acorn]
* Acorn parser to use (optional).
* @property {AcornOptions | null | undefined} [acornOptions]
* Configuration for acorn (default: `{ecmaVersion: 2020, locations: true,
* Configuration for acorn (default: `{ecmaVersion: 2024, locations: true,
* sourceType: 'module'}`); all fields except `locations` can be set.
* @property {boolean | null | undefined} [addResult=false]
* Whether to add `estree` fields to tokens with results from acorn
Expand Down Expand Up @@ -44,7 +44,7 @@ export function mdxJsx(options) {
}

acornOptions = Object.assign(
{ecmaVersion: 2020, sourceType: 'module'},
{ecmaVersion: 2024, sourceType: 'module'},
settings.acornOptions,
{locations: true}
)
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Configuration (TypeScript type).
* `acorn` ([`Acorn`][acorn], optional)
— acorn parser to use
* `acornOptions` ([`AcornOptions`][acorn-options], default:
`{ecmaVersion: 2020, locations: true, sourceType: 'module'}`)
`{ecmaVersion: 2024, locations: true, sourceType: 'module'}`)
— configuration for acorn; all fields except `locations` can be set
* `addResult` (`boolean`, default: `false`)
— whether to add `estree` fields to tokens with results from acorn
Expand Down

0 comments on commit 229b023

Please sign in to comment.