Update: fix indentation of EmptyStatements (fixes #8882)#8885
Merged
Update: fix indentation of EmptyStatements (fixes #8882)#8885
Conversation
The `indent` rule contains some logic to ensure that semicolons at the start of a line are indented correctly when using semicolon-free style. For example, in the following code the semicolon on the second line is not indented, even though it's part of the `bar()` statement. ```js if (foo) bar() ; [1, 2, 3].map(foo) ``` Due to a bug, this logic also applied to semicolons in `EmptyStatement` nodes, resulting in an incorrect indentation for those semicolons. This commit fixes that bug.
|
LGTM |
gyandeeps
approved these changes
Jul 8, 2017
This was referenced Jul 9, 2017
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Jul 10, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. Refs: eslint/eslint#8882 Refs: eslint/eslint#8885
2 tasks
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Jul 12, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. PR-URL: nodejs#14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax
pushed a commit
to nodejs/node
that referenced
this pull request
Jul 18, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. PR-URL: #14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Fishrock123
pushed a commit
to nodejs/node
that referenced
this pull request
Jul 19, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. PR-URL: #14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins
pushed a commit
to nodejs/node
that referenced
this pull request
Aug 16, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. PR-URL: #14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Aug 16, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. PR-URL: nodejs#14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins
pushed a commit
to nodejs/node
that referenced
this pull request
Aug 16, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. Backport-PR-URL: #14859 PR-URL: #14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins
pushed a commit
to nodejs/node
that referenced
this pull request
Sep 5, 2017
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to the non-legacy stricter indentation linting. Update to 4.2.0 to remove the blocking issue. Backport-PR-URL: #14859 PR-URL: #14155 Ref: eslint/eslint#8882 Ref: eslint/eslint#8885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request? (put an "X" next to item)
[x] Bug fix (#8882)
What changes did you make? (Give an overview)
The
indentrule contains some logic to ensure that semicolons at the start of a line are indented correctly when using semicolon-free style. For example, in the following code the semicolon on the second line is not indented, even though it's part of thebar()statement.Due to a bug, this logic also applied to semicolons in
EmptyStatementnodes, resulting in an incorrect indentation for those semicolons. This commit fixes that bug.Is there anything you'd like reviewers to focus on?
Nothing in particular