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

tools: disallow mixed spaces and tabs for indents #5135

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
6 participants
@Trott
Copy link
Member

commented Feb 8, 2016

Enable ESLlint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

While at it, I rearranged the style rules in .eslintrc to be in
alphabetical order. This has two benefits: It means the rules appear
in the same order as they do in the ESLint documentation, easing
cross-referencing. It also means that it is much easier to determine
with visual inspection if a rule is set or not.

@rvagg

This comment has been minimized.

Copy link
Member

commented Feb 8, 2016

A bit hard to tell that it's only about that one rule given the change, maybe this would be best as 2 commits? What if we jumped to disallowing tabs completely? I think that would be in line with style expectations anyway.

@mscdex

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2016

🔥 Down with the tabs! 🔥

@silverwind

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2016

Maybe we should do away with the descriptions above each rule so it's more apparent that these lists are alphabetically sorted. They don't add much value and one can get a better description for each rule by using the links in the file. 😉

@Trott Trott force-pushed the Trott:eslint-recommended branch Feb 8, 2016

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

@rvagg I like your suggestion of splitting this into two commits. Done!

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

What if we jumped to disallowing tabs completely?

With this new rule added, we would have tabs nearly completely disallowed, but not quite. See eslint/eslint#3521 for the explanation as to why ESLint doesn't support complete tab elimination without an external plugin. /shrug

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

Maybe we should do away with the descriptions above each rule so it's more apparent that these lists are alphabetically sorted.

Yes, I like that idea. Although we should probably do it for all the lists in the .eslintrc at once rather than just for the Stylistic Issues list that is modified in this PR...

@targos

This comment has been minimized.

Copy link
Member

commented Feb 8, 2016

The test changes are in the wrong commit

Trott added some commits Feb 8, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.
tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

@Trott Trott force-pushed the Trott:eslint-recommended branch to d7dca68 Feb 8, 2016

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

Thanks, @targos! Fixed and force-pushed.

@targos

This comment has been minimized.

Copy link
Member

commented Feb 8, 2016

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

CI failure looks like it's actually due to #5109. We can re-run once that gets tidied up.

@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2016

CI is back in decent shape, so let's try this again: https://ci.nodejs.org/job/node-test-pull-request/1593/

@silverwind

This comment has been minimized.

Copy link
Contributor

commented Feb 9, 2016

LGTM. Want to follow up with another PR to remove the comments?

Trott added a commit that referenced this pull request Feb 9, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.

#5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

Trott added a commit that referenced this pull request Feb 9, 2016

tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: #5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@Trott

This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2016

Landed in a84bf2c and eea987f

@Trott Trott closed this Feb 9, 2016

rvagg added a commit that referenced this pull request Feb 10, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.

#5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

rvagg added a commit that referenced this pull request Feb 10, 2016

tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: #5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

MylesBorins added a commit that referenced this pull request Feb 18, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.

#5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

MylesBorins added a commit that referenced this pull request Feb 18, 2016

tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: #5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

MylesBorins added a commit that referenced this pull request Feb 18, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.

#5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

MylesBorins added a commit that referenced this pull request Feb 18, 2016

tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: #5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

@MylesBorins MylesBorins referenced this pull request Feb 18, 2016

Merged

V4.4.0 proposal #5301

MylesBorins added a commit that referenced this pull request Mar 2, 2016

tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order.

This has two benefits:

It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.

It also means that it is much easier to determine with visual inspection
if a rule is set or not.

#5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>

MylesBorins added a commit that referenced this pull request Mar 2, 2016

tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: #5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.