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

react-in-jsx-scope doesn't work with ES6 imports #58

Closed
emmenko opened this issue Apr 10, 2015 · 3 comments
Closed

react-in-jsx-scope doesn't work with ES6 imports #58

emmenko opened this issue Apr 10, 2015 · 3 comments

Comments

@emmenko
Copy link
Contributor

emmenko commented Apr 10, 2015

This doesn't work

import React from 'react/addons'

const Button = React.createClass({
  render() {
    return (
      <button {...this.props}>{this.props.children}</button>
    )
  }
})

export default Button

but if I define it as a variable it does

import r from 'react/addons'
const React = r

const Button = React.createClass({
  render() {
    return (
      <button {...this.props}>{this.props.children}</button>
    )
  }
})

export default Button
@yannickcr
Copy link
Member

Thanks for the failing case. I'll look at this.

@yannickcr
Copy link
Member

It was related to eslint/eslint#1978 which is fixed in ESLint 0.19.0.

@emmenko
Copy link
Contributor Author

emmenko commented Apr 12, 2015

Cool, thanks! 👍

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

No branches or pull requests

2 participants