Editor parsing error with static class properties

I have a project that uses static class properties via Babel’s transform-class-properties plugin. They compile correctly, but the editor treats them as errors.

44%20PM

Example: https://glitch.com/edit/#!/aboard-skull?path=src/controllers/hello_controller.js:4:17

Is there any way to work around this?

:purple_heart:

2 Likes

ah yeah so the editor uses eslint and it would require babel-eslint to remove that error :upside_down_face: will take note of this for next time we discuss working on linting in the editor!

4 Likes

Thanks, @jennschiffer!

It would be great if Glitch automatically used babel-eslint when appropriate or even allowed specifying it as the parser in an app’s .eslintrc file.

This has been tripping people up as they use Glitch to learn Stimulus, and that’s likely to increase now that you’re promoting it: https://twitter.com/glitch/status/960891384868802565 (thank you for that!! :v:️).

1 Like

yes, it’s on our to-do list to add the ability for users to provide their own linting configuration :slight_smile:

1 Like

Any progress on this? This is still a problem.

Hello. Any update on this? Is there a work around? I’m getting this parsing error in my app. It’s preventing me from moving forward on a feature. Thanks.

Hey @aydrian

Based on recent experiences, I suspect that .eslintrc.json is currently respected by the Glitch editor, as long as you run refresh in the terminal after changing it.

Give it a try if you haven’t lately?

Linked thread P5 example runs, but when I copy the code into a new project P5 functions undefined - #2 by SteGriff

For prettierrc, see also https://help.glitch.com/kb/article/5-will-glitch-clean-up-my-code-formatting/

Thanks. I was able to get it working.

1 Like