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

align argument for indent VariableDeclarator #8976

Closed
sauyon opened this issue Jul 21, 2017 · 5 comments
Closed

align argument for indent VariableDeclarator #8976

sauyon opened this issue Jul 21, 2017 · 5 comments

Comments

@sauyon
Copy link

@sauyon sauyon commented Jul 21, 2017

I'd like to allow eslint to accept code that looks like this:

const foo = 'bar',
      baz = 'foo';

if (foo === 'bar') {
    console.log(baz);
}

I created a pull request for a change to the VariableDeclarator rule adding decimals (#8975), but it was pointed out that a different argument altogether (ie "first") would be a better way of solving the problem.

What it would do would be to allow variable declaractions to be aligned as above regardless of the indentation level

@platinumazure
Copy link
Member

@platinumazure platinumazure commented Nov 2, 2017

@eslint/eslint-team This just needs a champion and then we can accept!

@aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Nov 6, 2017

here's another 👍 , labeled as accepted.

@not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Nov 6, 2017

@aladdin-add Are you planning to champion this issue? Issues generally require 3 👍s in addition to a champion to be accepted.

(If you are planning to champion this issue, could you assign yourself to the issue on GitHub?)

@aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Nov 23, 2018

we might have to close the issue in the near future if no one has interests -- it has been open for a long time. /cc @eslint/eslint-team

@snooopcatt
Copy link

@snooopcatt snooopcatt commented Nov 23, 2018

I am interested in this. So much, in fact, I'm about to start working on PR.

platinumazure added a commit that referenced this issue Dec 23, 2018
#11193)

* New: add option `first` for VariableDeclarator in indent (fixes #8976)

* Chore: skip some lines of code for perf

* Chore: add more tests for indent
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.