Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

11.0.0-beta.0 - Private Instance Methods - Parsing error: params is not iterable #749

Closed
filmic opened this issue Feb 6, 2019 · 9 comments

Comments

@filmic
Copy link

filmic commented Feb 6, 2019

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):

class Person {
  #age = 19;

  #increaseAge() {
    this.#age++;
  }

  birthday() {
    this.#increaseAge();
    alert("Happy Birthday!");
  }
}

.eslintrc.js:

module.exports = {
	"parser": "babel-eslint",
};

babel.config.js:

module.exports = {
	presets: [],
	plugins: [
		"@babel/plugin-proposal-class-properties",
		"@babel/plugin-proposal-private-methods"
	]
};
@satazor
Copy link

satazor commented Feb 23, 2019

I'm also experiencing the same issue. I got around it temporarily by using arrow functions instead:

 #increaseAge = () => {
    this.#age++;
  }

@satazor
Copy link

satazor commented Feb 24, 2019

Actually, with the arrow function syntax I get:

Unexpected 'this'. (babel/no-invalid-this)

@satazor
Copy link

satazor commented Feb 24, 2019

After digging, I found this related issue: babel/babel#9506

@filmic
Copy link
Author

filmic commented Feb 25, 2019

The issue in Babel (babel/babel#9506) is blocked by estree/estree#180.

@IAmJulianAcosta
Copy link

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"

stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 4, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 9, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 9, 2019
@sepehr
Copy link

sepehr commented Sep 10, 2019

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"

stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 11, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 11, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 12, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 12, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 13, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 13, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 14, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 14, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 14, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 14, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 14, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 16, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 19, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 24, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 25, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 25, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 26, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 27, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 28, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 28, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Sep 30, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 1, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 2, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 2, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 3, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 3, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Oct 17, 2019
stevenvachon added a commit to stevenvachon/broken-link-checker that referenced this issue Dec 7, 2019
@kaicataldo
Copy link
Member

This is caused by babel/babel#9506.

@1nfility
Copy link

Any fix..?

@filmic
Copy link
Author

filmic commented May 12, 2020

It has been fixed in babel/babel#10914 (Babel v7.8.0)

@filmic filmic closed this as completed May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants