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

Indent rule ignores single statement if, while, for, do-while #1799

Closed
lo1tuma opened this issue Feb 8, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@lo1tuma
Copy link
Member

commented Feb 8, 2015

The following examples results in having no error:

if (a)
c();
else if (b)
d();
else
e();
while (a)
b();
for (;;)
a();
for (a in b)
c();
do
a();
while (b);

I would expect to have an error if a body statement is not indented.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@gyandeeps

This comment has been minimized.

Copy link
Member

commented Jul 12, 2015

Working on this.

gyandeeps added a commit that referenced this issue Jul 12, 2015

gyandeeps added a commit that referenced this issue Jul 13, 2015

gyandeeps added a commit that referenced this issue Jul 13, 2015

gyandeeps added a commit that referenced this issue Jul 13, 2015

@gyandeeps gyandeeps closed this in 5ec47de Jul 14, 2015

nzakas added a commit that referenced this issue Jul 14, 2015

Merge pull request #2978 from eslint/IndentRuleFix
Fix: Indent rule (fixes #1797, fixes #1799, fixes #2248, fixes #2343,…

@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.
You can’t perform that action at this time.