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

New Rule Proposal: jsx-indent #342

Closed
tuures opened this issue Dec 1, 2015 · 5 comments
Closed

New Rule Proposal: jsx-indent #342

tuures opened this issue Dec 1, 2015 · 5 comments
Labels

Comments

@tuures
Copy link
Contributor

tuures commented Dec 1, 2015

Like the indent rule from the core but for jsx lines too as right now they are being ignored.

The following would be considered as an error:

/*eslint jsx-indent: [2, 2]*/
Foo(a) => (
  <div>
<span>{a /* wrong indent here*/}</span>
  </div>
);
foo();

The following would not be considered as an error:

/*eslint jsx-indent: [2, 2]*/
Foo(a) => (
  <div>
    <span>{a}</span>
  </div>
);
foo();
@LinusU
Copy link

LinusU commented Dec 20, 2015

I would love to see this!, I think it should work just as the core indentation does, but for JSX lines. Hopefully it shouldn't be two hard to implement.

@BerkeleyTrue
Copy link

👍

yannickcr added a commit that referenced this issue Jan 4, 2016
@DanielSundberg
Copy link

Changelog says "Add jsx-intent rule", so the rule seems to be named "jsx-intent"? Here you talk about "jsx-indent"?

I'm not native in english but intent is something else than indent in my vocabulary...

The eslint rule for JS is called "indent".

@DanielSundberg
Copy link

Ok, I can see now that the rule is actually called "jsx-indent", perhaps just a typo in the changelog then...

@yannickcr
Copy link
Member

Yeah, it is a typo in the changelog :|

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

5 participants