astexplorer icon indicating copy to clipboard operation
astexplorer copied to clipboard

CodeMirror editor displays error on JavaScript class private fields

Open Scipion opened this issue 2 years ago • 0 comments

Describe the bug Class private fields appear in red in CodeMirror Editor e.g: "class X { #a() { } }"

To Reproduce Steps to reproduce the behavior:

  1. Write a class with a private field

Expected behavior highlighting is displayed not in red color.

Screenshots codemirror_privateidentifier_error

astexplorer settings:

  • Selected parser: all of them

Additional context CodeMirror version in package.json is "^5.22.0" which seems to be from 7 years ago. Codemirror 5.65.16 can fix the problem.

Also CodeMirror version 6 would fix the problem but also implies changing codemirror-graphql to cm6-graphql

Scipion avatar Dec 02 '23 18:12 Scipion