• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

eslint ES6 and public class fields

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

402

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
community guidelines
Community Expert ,
Jun 29, 2020 Jun 29, 2020

Copy link to clipboard

Copied

LATEST

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

https://jslint.com/help.html

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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
community guidelines