Parsing Error: Unexpected Token = (app runs fine, lint problem?)

Hi, there!
I’ve done some searching before posting and I’m almost sure that this is a lint thing from Glitch’s editor, but just to make sure and to know if there’s any solution to it I’m posting it here.

photo_2019-06-23_16-08-26

I’m getting Parsing Error: Unexpected Token = at the first line in a React Component. The project works fine, so it’s probably a lint error, however I didn’t find any solution to fix it. I’m still pretty new to JavaScript and React, btw.

Thanks in advance!

Related topics:


Hey @Markkop, welcome to the Glitch forum!

Class fields are still in the experimental state, and ESLint doesn’t natively support experimental features. This can be addressed by adding a plugin or custom parser to ESLint, but unfortunately Glitch’s linting isn’t fully configurable right now and plugins are one of the things that’s not available yet, so there’s no way to configure the built-in linting to ignore those errors. Sorry for the bother!

We plan to improve linting in Glitch and to make it more configurable, but I don’t have a timeline for that work yet. There are a few topics in the https://support.glitch.com/c/feature-ideas category around linter improvements, but I don’t think there’s anything for this - please feel free to create and vote for one to help us understand what folks would like us to work on.

1 Like

Thanks for this very complete answer!
Glitch is pretty awesome and I’m sure it will evolve even further <3

1 Like