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

False alarm with commas in JSX #1916

Closed
ustun opened this Issue Mar 2, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@ustun

ustun commented Mar 2, 2015

Putting a comma in a JSX expression causes a false alarm.

var X = React.createClass({

    render: function () {
        var hello = "Hello";
        var world = "World";
        return <span>{hello}, {world}</span>;
    }

});
{
  "ecmaFeatures": {
    "jsx": true
  }
}
$ eslint index.js

  ...
  6:28  error  A space is required after ','   comma-spacing

See babel/babel-eslint#18 for the original report. It was found out the issue was upstream.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 2, 2015

Member

Confirmed. We should not flag commas in JSX elements.

Member

nzakas commented Mar 2, 2015

Confirmed. We should not flag commas in JSX elements.

@btmills

This comment has been minimized.

Show comment
Hide comment
@btmills

btmills Mar 3, 2015

Member

Working on this.

Member

btmills commented Mar 3, 2015

Working on this.

@btmills btmills closed this in 3987cc2 Mar 3, 2015

nzakas added a commit that referenced this issue Mar 3, 2015

Merge pull request #1922 from eslint/issue1916
Fix: comma-spacing should ignore JSX text (fixes #1916)
@ustun

This comment has been minimized.

Show comment
Hide comment
@ustun

ustun Mar 3, 2015

Thank you @btmills !

ustun commented Mar 3, 2015

Thank you @btmills !

@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.