Highlighted

eslint ES6 and public class fields

Explorer ,
Jun 29, 2020

Copy link to clipboard

Copied

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?

 

Topics

Code

Views

39

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

eslint ES6 and public class fields

Explorer ,
Jun 29, 2020

Copy link to clipboard

Copied

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?

 

Topics

Code

Views

40

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jun 29, 2020

Copy link to clipboard

Copied

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

https://jslint.com/help.html

 

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...