Navigation Menu

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 · Fixed by #11193
Closed

align argument for indent VariableDeclarator #8976

sauyon opened this issue Jul 21, 2017 · 5 comments · Fixed by #11193
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint help wanted The team would welcome a contribution from the community for this issue indent Relates to the `indent` rule rule Relates to ESLint's core rules

Comments

@sauyon
Copy link

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

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jul 21, 2017
@not-an-aardvark not-an-aardvark added enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion indent Relates to the `indent` rule rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Jul 21, 2017
@platinumazure
Copy link
Member

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

@aladdin-add aladdin-add added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Nov 6, 2017
@aladdin-add
Copy link
Member

here's another 👍 , labeled as accepted.

@not-an-aardvark
Copy link
Member

@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 aladdin-add self-assigned this Nov 6, 2017
@kaicataldo kaicataldo added help wanted The team would welcome a contribution from the community for this issue Hacktoberfest Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/ labels Oct 15, 2018
@not-an-aardvark not-an-aardvark removed the Hacktoberfest Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 15, 2018
@aladdin-add
Copy link
Member

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

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

platinumazure pushed 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
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint help wanted The team would welcome a contribution from the community for this issue indent Relates to the `indent` rule rule Relates to ESLint's core rules
Projects
None yet
7 participants