Closed filmic closed 4 years ago
I'm also experiencing the same issue. I got around it temporarily by using arrow functions instead:
#increaseAge = () => {
this.#age++;
}
Actually, with the arrow function syntax I get:
Unexpected 'this'. (babel/no-invalid-this)
After digging, I found this related issue: https://github.com/babel/babel/issues/9506
The issue in Babel (babel/babel#9506) is blocked by estree/estree#180.
I can confirm this:
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-private-methods": "^7.3.4",
"eslint": "5.15.1",
"babel-eslint": "11.0.0-beta.0"
I also second this:
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-private-methods": "^7.6.0",
"eslint": "6.1.0",
"babel-eslint": "11.0.0-beta.0"
This is caused by https://github.com/babel/babel/issues/9506.
Any fix..?
It has been fixed in https://github.com/babel/babel/pull/10914 (Babel v7.8.0)
I'm getting following error:
Parsing error: params is not iterable
while linting a file with a private instance method.
Using:
@babel/core@7.2.2
@babel/plugin-proposal-class-properties@7.3.0
@babel/plugin-proposal-private-methods@7.3.2
babel-eslint@11.0.0-beta.0
eslint@5.13.0
test.js
(linted file):.eslintrc.js
:babel.config.js
: