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

Ignore comments option for indent rule #9018

Closed
platinumazure opened this issue Jul 26, 2017 · 27 comments · Fixed by mono-js/mono-notifications#5, mono-js/mono-push#5 or terrajs/lib-starter#5 · May be fixed by ali8889/emerald-wallet#4 or DmytroSkrypnyk/test_bootstrap#6
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 indent Relates to the `indent` rule rule Relates to ESLint's core rules

Comments

@platinumazure
Copy link
Member

What rule do you want to change?

indent

Does this change cause the rule to produce more or fewer warnings?

Potentially fewer warnings

How will the change be implemented? (New option, new default behavior, etc.)?

New option:

{
    "indent": ["error", 4, { "comments": "off" }]
}

This option will completely disregard lines beginning with comments and allow them to be at any indentation level.

Please provide some example code that this change will affect:

doSomething();  // This comment is fine
                           // This comment is reported, but shouldn't be

if (foo) {
    doBar();

// This comment is reported, but shouldn't be with new option
// (maybe comment should be easy to spot via outdenting?)
    doBaz();
}

What does the rule currently do for this code?

Reports all comments (except trailing comment on first line)

What will the rule do after it's changed?

Reports none of the comments

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jul 26, 2017
@platinumazure platinumazure 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 26, 2017
@gyandeeps
Copy link
Member

I think I can see this as a usable option for a small subset of our user base. On the other hand we need to think very very carefully when introducing option in indent rule since its very disruptive and hard to maintain long term.
Over time I have realized for sure is that with indent rule you can't please everyone but we should target ~85%.

@mcdoh
Copy link

mcdoh commented Jul 26, 2017

I use tabs and start my comments at column 0. This way I can comment out blocks of code without affecting the horizontal placement of the commented code (i.e. indenting with spaces would indent the commented code by two spaces). Personally I find this very readable and useful. The current eslint rules complain about my indent level and I have no way to turn that off short of changing my code style.

Ignoring indent levels on comments is exactly what I'm looking for.

@platinumazure
Copy link
Member Author

@gyandeeps What you say makes sense. For what it's worth, though, it could also be seen as a backward-compatibility enhancement for users that used to rely on indent ignoring comments.

@suewonjp
Copy link

Hi, always thanks a lot, ESlint team

I met this issue after upgrading Eslint to its latest version.

Providing an option to ignoring comments would be greatly appreciated

@platinumazure platinumazure self-assigned this Sep 19, 2017
@platinumazure
Copy link
Member Author

I'll champion this.

@eslint/eslint-team Anyone want to support this? Or if anyone can convince me of a better way to handle these use cases, I'd love to hear it! Thanks!

@servel333
Copy link

I would like to support this too. And, to add a concrete use-case, sometimes I put JSON object examples in my code to use as a reference, so they are commented out, and I will indent the comments at different levels in order to allow my editor to fold the comments when I'm not looking at them.

// {
  // "a": {
    // "aa": "01",
    // "ab": "02",
    // "ac": "03"
  // },
  // "b": 01,
// }

The middle lines produce an error in ESLint that I can't disable.

@maxgallo
Copy link

+1

@platinumazure
Copy link
Member Author

@eslint/eslint-team Following up from my previous comment: I'm championing this because it seems like we should add this feature as a back-compat enhancement for people who were implicitly relying on the old indent rule not enforcing comment indentation. If there's a better way we can handle that scenario in the new indent rule, I'm all for implementing this a different way. But at this point, it feels like the rule is incomplete without some ability to configure comment indent linting (including just ignoring comments in indent checks).

Can we get some discussion going on this? I'm happy to close if there's no consensus, but I haven't seen much evidence of discussion outside of this post from gyandeeps.

@kaicataldo
Copy link
Member

@platinumazure I'm not against this option, but now that it has correct autofixing it also seems like it's an easy fix!

@servel333 Would the following not work for you? This is what I would expect:

// {
//   "a": {
//     "aa": "01",
//     "ab": "02",
//     "ac": "03"
//   },
//   "b": 01,
// }

@servel333
Copy link

@kaicataldo Not always. If the line of comments is short then that works just fine, but if the line of comments is long then it's nice to indent the comments with the JSON so that I can fold the section in my editor. I've used multi line comments (/* */) to get around this, but the first /* still needs to line up with proper indention.

It's not a critical feature for me, but it's annoying enough that I have to work around it and alter my preferred coding style.

@tomhosford
Copy link

+1

@kaicataldo
Copy link
Member

@servel333 Understood - thanks for the explanation. Like I said, I'm not opposed to this in theory. The thing we have to figure out is what this does for autofixing. I think this would mean that autofixing for comments would have to be completely ignored if this option is set.

Also, please refrain from +1 comments - they're not helpful!

@servel333
Copy link

@kaicataldo Thanks. I totally understand and that makes sense. I don't use autofixing much, but I question what would happen to indented multi line comments when running the autofixer. Does it flatten them or ignore them currently?

@kaicataldo
Copy link
Member

I believe it aligns the opening comment delimiter: https://github.com/eslint/eslint/blob/master/tests/lib/rules/indent.js#L7065-L7084

I don't think it can align the second line because the whitespace might be intentional.

@tdmalone
Copy link

tdmalone commented Oct 26, 2017

Support from me for this too.

My use case, assuming I'm hitting my max line limit:

doSomething(); // This does something, but sometimes
               // it won't. Depends on your mood.

Currently I would have to change this to one of the following to still pass my indent rules; ideally I'd like to be able to ignore comment indentation instead:

// This does something, but sometimes it won't.
// Depends on your mood.
doSomething();
doSomething(); // This does something, but sometimes
// it won't. Depends on your mood.
doSomething(); /* This does something, but sometimes
                  it won't. Depends on your mood. */

(Thanks to @kaicataldo's comment above for pointing out the last option).

@elamperti
Copy link

+1 to this. I'm getting indentation errors commenting a .catch():

    thing.foo()
      .then(() => {
        doSomething();
      });
      // .catch((error) => {
      //   doSomethingElse(error);
      // });

(I can't make the ; after .then(...) optional in this project)

@servel333
Copy link

@elamperti If you're using the Bluebird library, you can put .tap(); at the end so you can comment middle sections without worrying about

thing.foo()
  .then(() => {
    doSomething();
  })
  // .catch((error) => {
  //   doSomethingElse(error);
  // })
  .tap();

Though, my personal style is to not indent it these cases, and it would be nice to have better ignore rules, I think this might help.

@davies147
Copy link

davies147 commented Nov 10, 2017

+1 as we need to stop those warnings somehow. I may have to try running an older eslint for now as IIRC that did not care about comments.

@kaicataldo
Copy link
Member

@davies147 No need to use an older version. We left the old indent rule in because we knew this was a big change and wanted to make sure it didn't cause too much disruption. Just change indent to indent-legacy in your configuration.

@davies147
Copy link

For all my googling I never found that option mentioned as a workaround for this issue. Many many thanks!

@kaicataldo
Copy link
Member

kaicataldo commented Nov 10, 2017

I can look into this later, but I think this could be handled by the ignoredNodes option. Unfortunately, now that we're not doing comment attachment, that might not currently work. Additionally, I prefer to not think of comments as AST nodes and as tokens instead, so maybe it should require a separate option (ignoreComments sounds good to me).

@not-an-aardvark Thoughts?

@luileito
Copy link

luileito commented Nov 10, 2017

Switching to indent-legacy did the trick. Thanks!

@davies147 I also didn't know such option existed 😕
@kaicataldo Comment nodes are not part of the AST, so the ignoredNodes approach won't work. +1 for ignoreComments or similar.

@platinumazure
Copy link
Member Author

There are so many 👍s on the original comment that I don't know how many team members are supporting this issue. Yowzer.

Yes, the fact that comments aren't a node type is why I think an ignoreComments option would be useful.

@not-an-aardvark
Copy link
Member

I got the list of 👍s from GitHub's API:

Results
$ curl -H 'Accept: application/vnd.github.squirrel-girl-preview' https://api.github.com/repos/eslint/eslint/issues/9018/reactions
[
  {
    "id": 12336872,
    "user": {
      "login": "Kay2dan",
      "id": 6276091,
      "avatar_url": "https://avatars3.githubusercontent.com/u/6276091?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/Kay2dan",
      "html_url": "https://github.com/Kay2dan",
      "followers_url": "https://api.github.com/users/Kay2dan/followers",
      "following_url": "https://api.github.com/users/Kay2dan/following{/other_user}",
      "gists_url": "https://api.github.com/users/Kay2dan/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Kay2dan/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Kay2dan/subscriptions",
      "organizations_url": "https://api.github.com/users/Kay2dan/orgs",
      "repos_url": "https://api.github.com/users/Kay2dan/repos",
      "events_url": "https://api.github.com/users/Kay2dan/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Kay2dan/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-07-30T19:23:20Z"
  },
  {
    "id": 12674209,
    "user": {
      "login": "svnv",
      "id": 1080888,
      "avatar_url": "https://avatars0.githubusercontent.com/u/1080888?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/svnv",
      "html_url": "https://github.com/svnv",
      "followers_url": "https://api.github.com/users/svnv/followers",
      "following_url": "https://api.github.com/users/svnv/following{/other_user}",
      "gists_url": "https://api.github.com/users/svnv/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/svnv/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/svnv/subscriptions",
      "organizations_url": "https://api.github.com/users/svnv/orgs",
      "repos_url": "https://api.github.com/users/svnv/repos",
      "events_url": "https://api.github.com/users/svnv/events{/privacy}",
      "received_events_url": "https://api.github.com/users/svnv/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-08-09T09:11:10Z"
  },
  {
    "id": 12875854,
    "user": {
      "login": "sleepingkiwi",
      "id": 1451445,
      "avatar_url": "https://avatars1.githubusercontent.com/u/1451445?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/sleepingkiwi",
      "html_url": "https://github.com/sleepingkiwi",
      "followers_url": "https://api.github.com/users/sleepingkiwi/followers",
      "following_url": "https://api.github.com/users/sleepingkiwi/following{/other_user}",
      "gists_url": "https://api.github.com/users/sleepingkiwi/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/sleepingkiwi/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/sleepingkiwi/subscriptions",
      "organizations_url": "https://api.github.com/users/sleepingkiwi/orgs",
      "repos_url": "https://api.github.com/users/sleepingkiwi/repos",
      "events_url": "https://api.github.com/users/sleepingkiwi/events{/privacy}",
      "received_events_url": "https://api.github.com/users/sleepingkiwi/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-08-15T15:42:39Z"
  },
  {
    "id": 12905335,
    "user": {
      "login": "DenisTis",
      "id": 25088327,
      "avatar_url": "https://avatars2.githubusercontent.com/u/25088327?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/DenisTis",
      "html_url": "https://github.com/DenisTis",
      "followers_url": "https://api.github.com/users/DenisTis/followers",
      "following_url": "https://api.github.com/users/DenisTis/following{/other_user}",
      "gists_url": "https://api.github.com/users/DenisTis/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/DenisTis/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/DenisTis/subscriptions",
      "organizations_url": "https://api.github.com/users/DenisTis/orgs",
      "repos_url": "https://api.github.com/users/DenisTis/repos",
      "events_url": "https://api.github.com/users/DenisTis/events{/privacy}",
      "received_events_url": "https://api.github.com/users/DenisTis/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-08-16T09:22:33Z"
  },
  {
    "id": 13562203,
    "user": {
      "login": "am-jo-zt",
      "id": 11964720,
      "avatar_url": "https://avatars0.githubusercontent.com/u/11964720?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/am-jo-zt",
      "html_url": "https://github.com/am-jo-zt",
      "followers_url": "https://api.github.com/users/am-jo-zt/followers",
      "following_url": "https://api.github.com/users/am-jo-zt/following{/other_user}",
      "gists_url": "https://api.github.com/users/am-jo-zt/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/am-jo-zt/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/am-jo-zt/subscriptions",
      "organizations_url": "https://api.github.com/users/am-jo-zt/orgs",
      "repos_url": "https://api.github.com/users/am-jo-zt/repos",
      "events_url": "https://api.github.com/users/am-jo-zt/events{/privacy}",
      "received_events_url": "https://api.github.com/users/am-jo-zt/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-05T07:54:40Z"
  },
  {
    "id": 13734537,
    "user": {
      "login": "full-of-foo",
      "id": 2990344,
      "avatar_url": "https://avatars0.githubusercontent.com/u/2990344?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/full-of-foo",
      "html_url": "https://github.com/full-of-foo",
      "followers_url": "https://api.github.com/users/full-of-foo/followers",
      "following_url": "https://api.github.com/users/full-of-foo/following{/other_user}",
      "gists_url": "https://api.github.com/users/full-of-foo/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/full-of-foo/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/full-of-foo/subscriptions",
      "organizations_url": "https://api.github.com/users/full-of-foo/orgs",
      "repos_url": "https://api.github.com/users/full-of-foo/repos",
      "events_url": "https://api.github.com/users/full-of-foo/events{/privacy}",
      "received_events_url": "https://api.github.com/users/full-of-foo/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-09T15:19:57Z"
  },
  {
    "id": 13767321,
    "user": {
      "login": "amishne",
      "id": 3197814,
      "avatar_url": "https://avatars0.githubusercontent.com/u/3197814?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/amishne",
      "html_url": "https://github.com/amishne",
      "followers_url": "https://api.github.com/users/amishne/followers",
      "following_url": "https://api.github.com/users/amishne/following{/other_user}",
      "gists_url": "https://api.github.com/users/amishne/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/amishne/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/amishne/subscriptions",
      "organizations_url": "https://api.github.com/users/amishne/orgs",
      "repos_url": "https://api.github.com/users/amishne/repos",
      "events_url": "https://api.github.com/users/amishne/events{/privacy}",
      "received_events_url": "https://api.github.com/users/amishne/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-11T12:05:38Z"
  },
  {
    "id": 13897558,
    "user": {
      "login": "dmitry-mashkov",
      "id": 10669331,
      "avatar_url": "https://avatars2.githubusercontent.com/u/10669331?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/dmitry-mashkov",
      "html_url": "https://github.com/dmitry-mashkov",
      "followers_url": "https://api.github.com/users/dmitry-mashkov/followers",
      "following_url": "https://api.github.com/users/dmitry-mashkov/following{/other_user}",
      "gists_url": "https://api.github.com/users/dmitry-mashkov/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/dmitry-mashkov/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/dmitry-mashkov/subscriptions",
      "organizations_url": "https://api.github.com/users/dmitry-mashkov/orgs",
      "repos_url": "https://api.github.com/users/dmitry-mashkov/repos",
      "events_url": "https://api.github.com/users/dmitry-mashkov/events{/privacy}",
      "received_events_url": "https://api.github.com/users/dmitry-mashkov/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-14T08:18:43Z"
  },
  {
    "id": 14043764,
    "user": {
      "login": "suewonjp",
      "id": 5332080,
      "avatar_url": "https://avatars3.githubusercontent.com/u/5332080?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/suewonjp",
      "html_url": "https://github.com/suewonjp",
      "followers_url": "https://api.github.com/users/suewonjp/followers",
      "following_url": "https://api.github.com/users/suewonjp/following{/other_user}",
      "gists_url": "https://api.github.com/users/suewonjp/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/suewonjp/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/suewonjp/subscriptions",
      "organizations_url": "https://api.github.com/users/suewonjp/orgs",
      "repos_url": "https://api.github.com/users/suewonjp/repos",
      "events_url": "https://api.github.com/users/suewonjp/events{/privacy}",
      "received_events_url": "https://api.github.com/users/suewonjp/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-19T01:49:23Z"
  },
  {
    "id": 14229171,
    "user": {
      "login": "Seybo",
      "id": 10584167,
      "avatar_url": "https://avatars0.githubusercontent.com/u/10584167?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/Seybo",
      "html_url": "https://github.com/Seybo",
      "followers_url": "https://api.github.com/users/Seybo/followers",
      "following_url": "https://api.github.com/users/Seybo/following{/other_user}",
      "gists_url": "https://api.github.com/users/Seybo/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Seybo/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Seybo/subscriptions",
      "organizations_url": "https://api.github.com/users/Seybo/orgs",
      "repos_url": "https://api.github.com/users/Seybo/repos",
      "events_url": "https://api.github.com/users/Seybo/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Seybo/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-09-23T06:07:19Z"
  },
  {
    "id": 14930759,
    "user": {
      "login": "neeh",
      "id": 2312419,
      "avatar_url": "https://avatars0.githubusercontent.com/u/2312419?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/neeh",
      "html_url": "https://github.com/neeh",
      "followers_url": "https://api.github.com/users/neeh/followers",
      "following_url": "https://api.github.com/users/neeh/following{/other_user}",
      "gists_url": "https://api.github.com/users/neeh/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/neeh/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/neeh/subscriptions",
      "organizations_url": "https://api.github.com/users/neeh/orgs",
      "repos_url": "https://api.github.com/users/neeh/repos",
      "events_url": "https://api.github.com/users/neeh/events{/privacy}",
      "received_events_url": "https://api.github.com/users/neeh/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-10-12T15:57:36Z"
  },
  {
    "id": 15050484,
    "user": {
      "login": "not-an-aardvark",
      "id": 11638619,
      "avatar_url": "https://avatars2.githubusercontent.com/u/11638619?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/not-an-aardvark",
      "html_url": "https://github.com/not-an-aardvark",
      "followers_url": "https://api.github.com/users/not-an-aardvark/followers",
      "following_url": "https://api.github.com/users/not-an-aardvark/following{/other_user}",
      "gists_url": "https://api.github.com/users/not-an-aardvark/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/not-an-aardvark/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/not-an-aardvark/subscriptions",
      "organizations_url": "https://api.github.com/users/not-an-aardvark/orgs",
      "repos_url": "https://api.github.com/users/not-an-aardvark/repos",
      "events_url": "https://api.github.com/users/not-an-aardvark/events{/privacy}",
      "received_events_url": "https://api.github.com/users/not-an-aardvark/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-10-16T16:10:08Z"
  },
  {
    "id": 15514326,
    "user": {
      "login": "ppdeassis",
      "id": 3471751,
      "avatar_url": "https://avatars2.githubusercontent.com/u/3471751?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/ppdeassis",
      "html_url": "https://github.com/ppdeassis",
      "followers_url": "https://api.github.com/users/ppdeassis/followers",
      "following_url": "https://api.github.com/users/ppdeassis/following{/other_user}",
      "gists_url": "https://api.github.com/users/ppdeassis/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/ppdeassis/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/ppdeassis/subscriptions",
      "organizations_url": "https://api.github.com/users/ppdeassis/orgs",
      "repos_url": "https://api.github.com/users/ppdeassis/repos",
      "events_url": "https://api.github.com/users/ppdeassis/events{/privacy}",
      "received_events_url": "https://api.github.com/users/ppdeassis/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-10-27T17:06:04Z"
  },
  {
    "id": 15514414,
    "user": {
      "login": "mfirmin",
      "id": 6256205,
      "avatar_url": "https://avatars0.githubusercontent.com/u/6256205?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mfirmin",
      "html_url": "https://github.com/mfirmin",
      "followers_url": "https://api.github.com/users/mfirmin/followers",
      "following_url": "https://api.github.com/users/mfirmin/following{/other_user}",
      "gists_url": "https://api.github.com/users/mfirmin/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mfirmin/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mfirmin/subscriptions",
      "organizations_url": "https://api.github.com/users/mfirmin/orgs",
      "repos_url": "https://api.github.com/users/mfirmin/repos",
      "events_url": "https://api.github.com/users/mfirmin/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mfirmin/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-10-27T17:08:19Z"
  },
  {
    "id": 15798684,
    "user": {
      "login": "elamperti",
      "id": 910672,
      "avatar_url": "https://avatars0.githubusercontent.com/u/910672?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/elamperti",
      "html_url": "https://github.com/elamperti",
      "followers_url": "https://api.github.com/users/elamperti/followers",
      "following_url": "https://api.github.com/users/elamperti/following{/other_user}",
      "gists_url": "https://api.github.com/users/elamperti/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/elamperti/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/elamperti/subscriptions",
      "organizations_url": "https://api.github.com/users/elamperti/orgs",
      "repos_url": "https://api.github.com/users/elamperti/repos",
      "events_url": "https://api.github.com/users/elamperti/events{/privacy}",
      "received_events_url": "https://api.github.com/users/elamperti/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-05T02:54:29Z"
  },
  {
    "id": 15826134,
    "user": {
      "login": "luileito",
      "id": 1146339,
      "avatar_url": "https://avatars0.githubusercontent.com/u/1146339?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/luileito",
      "html_url": "https://github.com/luileito",
      "followers_url": "https://api.github.com/users/luileito/followers",
      "following_url": "https://api.github.com/users/luileito/following{/other_user}",
      "gists_url": "https://api.github.com/users/luileito/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/luileito/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/luileito/subscriptions",
      "organizations_url": "https://api.github.com/users/luileito/orgs",
      "repos_url": "https://api.github.com/users/luileito/repos",
      "events_url": "https://api.github.com/users/luileito/events{/privacy}",
      "received_events_url": "https://api.github.com/users/luileito/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-06T11:10:05Z"
  },
  {
    "id": 15826172,
    "user": {
      "login": "chverma",
      "id": 538853,
      "avatar_url": "https://avatars3.githubusercontent.com/u/538853?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/chverma",
      "html_url": "https://github.com/chverma",
      "followers_url": "https://api.github.com/users/chverma/followers",
      "following_url": "https://api.github.com/users/chverma/following{/other_user}",
      "gists_url": "https://api.github.com/users/chverma/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/chverma/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/chverma/subscriptions",
      "organizations_url": "https://api.github.com/users/chverma/orgs",
      "repos_url": "https://api.github.com/users/chverma/repos",
      "events_url": "https://api.github.com/users/chverma/events{/privacy}",
      "received_events_url": "https://api.github.com/users/chverma/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-06T11:11:18Z"
  },
  {
    "id": 15826178,
    "user": {
      "login": "carmilso",
      "id": 7313231,
      "avatar_url": "https://avatars0.githubusercontent.com/u/7313231?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/carmilso",
      "html_url": "https://github.com/carmilso",
      "followers_url": "https://api.github.com/users/carmilso/followers",
      "following_url": "https://api.github.com/users/carmilso/following{/other_user}",
      "gists_url": "https://api.github.com/users/carmilso/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/carmilso/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/carmilso/subscriptions",
      "organizations_url": "https://api.github.com/users/carmilso/orgs",
      "repos_url": "https://api.github.com/users/carmilso/repos",
      "events_url": "https://api.github.com/users/carmilso/events{/privacy}",
      "received_events_url": "https://api.github.com/users/carmilso/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-06T11:11:24Z"
  },
  {
    "id": 15832567,
    "user": {
      "login": "valabau",
      "id": 1173412,
      "avatar_url": "https://avatars1.githubusercontent.com/u/1173412?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/valabau",
      "html_url": "https://github.com/valabau",
      "followers_url": "https://api.github.com/users/valabau/followers",
      "following_url": "https://api.github.com/users/valabau/following{/other_user}",
      "gists_url": "https://api.github.com/users/valabau/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/valabau/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/valabau/subscriptions",
      "organizations_url": "https://api.github.com/users/valabau/orgs",
      "repos_url": "https://api.github.com/users/valabau/repos",
      "events_url": "https://api.github.com/users/valabau/events{/privacy}",
      "received_events_url": "https://api.github.com/users/valabau/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-06T14:06:39Z"
  },
  {
    "id": 16000659,
    "user": {
      "login": "ottograjeda",
      "id": 11876162,
      "avatar_url": "https://avatars0.githubusercontent.com/u/11876162?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/ottograjeda",
      "html_url": "https://github.com/ottograjeda",
      "followers_url": "https://api.github.com/users/ottograjeda/followers",
      "following_url": "https://api.github.com/users/ottograjeda/following{/other_user}",
      "gists_url": "https://api.github.com/users/ottograjeda/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/ottograjeda/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/ottograjeda/subscriptions",
      "organizations_url": "https://api.github.com/users/ottograjeda/orgs",
      "repos_url": "https://api.github.com/users/ottograjeda/repos",
      "events_url": "https://api.github.com/users/ottograjeda/events{/privacy}",
      "received_events_url": "https://api.github.com/users/ottograjeda/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-09T18:14:21Z"
  },
  {
    "id": 16039290,
    "user": {
      "login": "davies147",
      "id": 14699,
      "avatar_url": "https://avatars0.githubusercontent.com/u/14699?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/davies147",
      "html_url": "https://github.com/davies147",
      "followers_url": "https://api.github.com/users/davies147/followers",
      "following_url": "https://api.github.com/users/davies147/following{/other_user}",
      "gists_url": "https://api.github.com/users/davies147/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/davies147/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/davies147/subscriptions",
      "organizations_url": "https://api.github.com/users/davies147/orgs",
      "repos_url": "https://api.github.com/users/davies147/repos",
      "events_url": "https://api.github.com/users/davies147/events{/privacy}",
      "received_events_url": "https://api.github.com/users/davies147/received_events",
      "type": "User",
      "site_admin": false
    },
    "content": "+1",
    "created_at": "2017-11-10T14:59:26Z"
  }
]

Right now I think I'm the only team member that has given a 👍

@kaicataldo
Copy link
Member

kaicataldo commented Nov 10, 2017

If it makes it easier for people to start using the new indent rule I'm for adding this change, since I don't think it adds significant complexity (let me know if I'm wrong!). Thumbed! We just need one more 👍 from the team.

@zocky
Copy link

zocky commented Nov 30, 2017

+1 for this. My usecase has to do with code folding in editors that rely on indentation (e.g Visual studio code). I want this:

function doStuff() {
// do some stuff
  doSomething()
  moreImplementationDetails();
// do some more stuff
  doSomethingElse()
  evenMoreImplementationDetails();
// clean up
  doCleanup()
  finalImplementationDetails();
}

folded as:

function doStuff() {
// do some stuff ...
// do some more stuff ...
// clean up ...
}

@ilyavolodin ilyavolodin 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 Dec 1, 2017
@platinumazure
Copy link
Member Author

Oh, I didn't see this get accepted. If nobody beats me to it, I'll work on this sometime this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.