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/jsx-curly-spacing": [ 2, "always", { "spacing": { "objectLiterals": "never" }}] errors on node context #671

Closed
MoOx opened this issue Jul 8, 2016 · 1 comment
Labels

Comments

@MoOx
Copy link
Contributor

MoOx commented Jul 8, 2016

I added spacing/objectLiterals config for jsx-curly-spacing and I think I am getting an issue.

  render() {
    return (
      <div
        onClick={ this.handleClick }
        style={{ color: "blue" }} // From doc, it should affect only this part right?
      >
        { // <- There should be no newline after '{'
          !this.state.clicked
          ? "Hi"
          : "Hey"
        } // <- There should be no newline before '{'
      </div>
    )
  }

The doc only show an example in props, not sure why it's yelling for nodes.

@ljharb
Copy link
Member

ljharb commented Jul 8, 2016

Yes, you're correct. If that's erroring out, it's a bug.

@ljharb ljharb added the bug label Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants