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

Double colon (::) operator #370

Closed
flipjs opened this issue Jan 5, 2016 · 1 comment

Comments

@flipjs
Copy link

commented Jan 5, 2016

I downloaded a boilerplate from TJ Holowaychuk and he is using :: operator like this ::this.onClick . I guess it has the same effect as this.onClick.bind(this).

My vim editor complains about this and the message is "Parsing error: Unexpected token : (undefined)" . Is this being added to standard? Or does eslint even support this yet?

Here's the link to TJ's code:

https://github.com/tj/frontend-boilerplate/blob/master/client/components/Header/index.jsx

@jprichardson

This comment has been minimized.

Copy link
Member

commented Jan 5, 2016

This is an ES7 feature. You need to use the custom parser, babel-eslint. See: http://standardjs.com/index.html#can-i-use-a-custom-js-parser-for-bleeding-edge-es6-or-es7-support

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.