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
(cherry picked from commit 5acb52e)
  • Loading branch information
shilman authored and storybook-bot committed Jan 18, 2024
1 parent 8c63537 commit 8cfef1a
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 8cfef1a

Please sign in to comment.