Parsing error: Unexpected character '#'
See original GitHub issueThe 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:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any prediction for eslint to support this new syntax? private class fields are already available on node 12
ESLint only supports Stage 4.