fkling / astexplorer

A web tool to explore the ASTs generated by various parsers.
https://astexplorer.net/
MIT License
6.14k stars 729 forks source link

CodeMirror editor displays error on JavaScript class private fields #702

Closed Scipion closed 8 months ago

Scipion commented 10 months ago

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:

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

fkling commented 8 months ago

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

I definitely want to upgrade to CodeMirror 6 eventually (I'm using it in other projects and it's amazing) but I'd probably do that together with a larger update of the app.