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

ES6JSX branch gives no-multi-str errors on JSX #1533

Closed
jergason opened this Issue Nov 29, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@jergason

jergason commented Nov 29, 2014

I'm using eslint v0.11.0-alpha.0 and getting no-mult-str errors in my JSX template code:

var React = require('react');

var App = React.createClass({
  render: function() {
    return (
      <div>
        <h1>wat</h1>
      </div>
    );
  }
});

React.render(<App />, document.body);

This produces the following errors:

ಠ_ಠ  ~/code/happytrack λ eslint durp.jsx

durp.jsx
  3:4   error  App is defined but never used                                 no-unused-vars
  6:11  error  Multiline support is limited to browsers supporting ES5 only  no-multi-str
  7:20  error  Multiline support is limited to browsers supporting ES5 only  no-multi-str

✖ 3 problems

The first error looks like it is from estools/escope#33, but the last two errors seem incorrect. I expected the es6jsx branch to correctly parse JSX without giving no-multi-str errors. Am I doing something wrong?

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Nov 29, 2014

Member

Interesting, looks like the JSX literal is being interpreted as a string literal. Definitely a bug.

Can you file a separate issue for the first warning? It's related to escope but since escope doesn't support JSX, we will need to handle that separately.

Member

nzakas commented Nov 29, 2014

Interesting, looks like the JSX literal is being interpreted as a string literal. Definitely a bug.

Can you file a separate issue for the first warning? It's related to escope but since escope doesn't support JSX, we will need to handle that separately.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Nov 30, 2014

Member

Opened #153 to track the scoping issue.

Member

nzakas commented Nov 30, 2014

Opened #153 to track the scoping issue.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Nov 30, 2014

Member

Working on this.

Member

nzakas commented Nov 30, 2014

Working on this.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Nov 30, 2014

Member

Checked into es6jsx branch

Member

nzakas commented Nov 30, 2014

Checked into es6jsx branch

@jergason

This comment has been minimized.

Show comment
Hide comment
@jergason

jergason Dec 18, 2014

Looks like you mean #1534 not #153 to track to other issue.

jergason commented Dec 18, 2014

Looks like you mean #1534 not #153 to track to other issue.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Dec 19, 2014

Member

oops yeah, sorry about that

Member

nzakas commented Dec 19, 2014

oops yeah, sorry about that

@nzakas nzakas closed this in fa435ed Jan 11, 2015

nzakas added a commit that referenced this issue Jan 11, 2015

Merge pull request #1645 from eslint/issue1533
Fix: Don't warn on JSX literals with newlines (fixes #1533)

Holixus pushed a commit to Holixus/eslint that referenced this issue Feb 12, 2015

@eslint eslint bot locked and limited conversation to collaborators Feb 7, 2018

@eslint eslint bot added the archived due to age label Feb 7, 2018

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