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

jsx-indent: issue with multiline function calls #895

Closed
ljharb opened this issue Oct 9, 2016 · 1 comment
Closed

jsx-indent: issue with multiline function calls #895

ljharb opened this issue Oct 9, 2016 · 1 comment
Labels

Comments

@ljharb
Copy link
Member

ljharb commented Oct 9, 2016

I have this code:

    it('passes', () => assertPasses(
      foo('bar'),
      (
        <div>
          <span />
          <span />
          <span />
          <span />
        </div>
      ),
      'baz',
    ));

With these settings:

'react/jsx-indent': ['error', 2],

I get this warning: Expected indentation of 6 space characters but found 8

This code passes:

    it('passes', () => assertPasses(
      foo('bar'),
      (<div>
        <span />
        <span />
        <span />
        <span />
      </div>),
      'baz',
    ));

I don't mind if the latter example passes - but the former example should be correct also.

@ljharb
Copy link
Member Author

ljharb commented Oct 9, 2016

Thanks!

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