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

63

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

64

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
Jun 29, 2020 0
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 Design & Publishing

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...
Jun 29, 2020 1