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 doesn’t validate variable declarations #1800

Closed
lo1tuma opened this issue Feb 8, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@lo1tuma
Copy link
Member

commented Feb 8, 2015

The following example has no error:

var a = 1,
b = 2,
c = 3;

I would expect the following errors:

2:0  error  Expected indentation of 4 characters  indent
3:0  error  Expected indentation of 4 characters  indent

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

@puzrin

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2015

Make sure, that this style is also valid:

var a = 1
  , b = 2
  , c = 3;
@nzakas

This comment has been minimized.

Copy link
Member

commented Feb 14, 2015

@puzrin I'd assume that would only be valid when using two spaces as an indent?

@puzrin

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2015

I work only with node's packages, and non 2-spaces style is very rare there. Not enougth experience to give recommendations in general.

https://github.com/nodeca/eslint-plugin-nodeca/blob/master/test/fixtures.yml#L57-L65

See this example, it covers jshint logic. I think, it would be nice to run all those fixtures in bulk via new implementation.

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 14, 2015

@nzakas nzakas closed this in #2978 Jul 14, 2015

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