Skip to main content
JoseAlvira
Known Participant
Jun 29, 2020 7:22 PM UTC
Question

eslint ES6 and public class fields

I have been unable to set eslint to recognize public class fields.

 

I set ecmaversion to 6 in the eslintrc.js, and I also tried deleting the file and set version to 6 in the site configuration and I still get an error with code like:

 

class MyClass {

var1 = 5

...

Any idea?

 

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Nancy OShea
Community Expert
Community Expert
Jun 29, 2020 10:11 PM UTC

JS Linters are rarely perfect.  Take the good with the bad.

https://jslint.com/help.html

 

 

Translate
Nancy O'Shea— Product User & Community Expert