question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing error: Unexpected character '#'

See original GitHub issue

The version of ESLint you are using. v5.16.0

The problem you want to solve. support new feature: public/private class fields

class Animal {
  constructor(name) {
    this.name = name;
  }
}

class Cat extends Animal {
  likesBaths = false;
  #canFly = false
  meow() {
    console.log('Meow!');
  }
}

Your take on the correct solution to problem. no error lint on env=node

Are you willing to submit a pull request to implement this change? no

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
flavluccommented, Jun 18, 2019

any prediction for eslint to support this new syntax? private class fields are already available on node 12

0reactions
g-planecommented, Jun 18, 2019

ESLint only supports Stage 4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint - Parsing error: Unexpected character '#' while declaring ...
When using '#' to declare a private member in a javascript class, eslint throws an error Parsing error: Unexpected character '#' .
Read more >
Parsing error: Unexpected character '#' · Issue #1542 - GitHub
I have tried writing // eslint-disable-next-line on the line before the line in error. I have also tried writing // eslint-disable-line at the ......
Read more >
Template Literals: Parsing error: Unexpected character ...
Hello All,. I am getting ESLINT error for using back tick character in order to use the template literals in a js file....
Read more >
Please help me fix this error Parse error - WordPress.org
Please help me fix this error Parse error: syntax error, unexpected character · 1. Download the latest version of WordPress CMS. · 2....
Read more >
vue/no-parsing-error
disallow parsing errors in ` ` ... Syntax errors of scripts in mustaches. ... "unexpected-character-in-unquoted-attribute-value": true, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found