Skip to content

Commit

Permalink
Merge pull request #25634 from storybookjs/dannyhw/fix-acornparser-wa…
Browse files Browse the repository at this point in the history
…rning

React: Fix acorn ecma version warning
  • Loading branch information
shilman authored Jan 18, 2024
2 parents 73d3dbc + ea73aa9 commit 5acb52e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function parseExpression(expression: any): ParsingResult<InspectionInferedType>
}

export function parse(value: string): ParsingResult<InspectionInferedType> {
const ast = acornParser.parse(`(${value})`) as unknown as estree.Program;
const ast = acornParser.parse(`(${value})`, { ecmaVersion: 2020 }) as unknown as estree.Program;

let parsingResult: ParsingResult<InspectionUnknown> = {
inferredType: { type: InspectionType.UNKNOWN },
Expand Down

0 comments on commit 5acb52e

Please sign in to comment.