Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint v4 and arrow functions as properties #18106

Closed
oandregal opened this issue Sep 17, 2017 · 2 comments
Closed

ESLint v4 and arrow functions as properties #18106

oandregal opened this issue Sep 17, 2017 · 2 comments

Comments

@oandregal
Copy link
Contributor

oandregal commented Sep 17, 2017

On upgrading ESLint to v4, we ran into the following issue: class properties that are arrow functions are reported as no-undef issues.

So this is no longer valid:

class MyClass extends Component {
	myArrowFunction = () => ...;
}

But this is:

class MyClass extends Component {
	myFunction() {...}
}

This feature is provided by the transform-class-properties transformation, included in the stage2 babel preset. There are other projects that are reporting the same. This seems somehow related to ESLint v4, as in the v3 line this error doesn't happen.

Will need more time to investigate, so in the meantime, I'm reverting the upgrade.

@oandregal
Copy link
Contributor Author

babel-eslint, the parser we use for ESLint, doesn't support ESLint v4 yet. This issue has been reported.

@oandregal
Copy link
Contributor Author

Addressed by #24308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants