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

Update: indentation of comment followed by semicolon (fixes #12232) #12243

Merged
merged 1 commit into from Sep 14, 2019

Conversation

@kaicataldo
Copy link
Member

kaicataldo commented Sep 8, 2019

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

fixes #12232

What changes did you make? (Give an overview)
This PR adds additional logic for comments that precede a line that begins with a semicolon. The current behavior (indenting 1 level) exists because the comment is treated as a child of the node on the previous line.

Is there anything you'd like reviewers to focus on?
Nothing in particular!

@eslint eslint bot added the triage label Sep 8, 2019
@kaicataldo kaicataldo added accepted bug indent and removed triage labels Sep 8, 2019
@kaicataldo kaicataldo force-pushed the fixes-12232 branch 5 times, most recently from d5c72b2 to 05db44c Sep 9, 2019
@platinumazure

This comment has been minimized.

Copy link
Member

platinumazure commented Sep 9, 2019

@kaicataldo Thanks for contributing!

As this is a bug fix which adds new warnings in some circumstances, could you please update the commit summary tag to "Update"? Thanks!

@kaicataldo

This comment has been minimized.

Copy link
Member Author

kaicataldo commented Sep 9, 2019

Sure thing! I was thinking of this as a semver-patch change because it should have the same number of warnings - it’s just enforcing a different indentation.

@kaicataldo kaicataldo force-pushed the fixes-12232 branch from 05db44c to 2e633d3 Sep 9, 2019
@kaicataldo kaicataldo changed the title Fix: indentation of comment followed by semicolon (fixes #12232) Update: indentation of comment followed by semicolon (fixes #12232) Sep 9, 2019
@kaicataldo

This comment has been minimized.

Copy link
Member Author

kaicataldo commented Sep 9, 2019

Huh, looks like the commit message check is now checking the last commit rather than the first. I'll squash my commits.

@kaicataldo kaicataldo force-pushed the fixes-12232 branch from 2e633d3 to 0192f74 Sep 9, 2019
@platinumazure

This comment has been minimized.

Copy link
Member

platinumazure commented Sep 9, 2019

The commit-message check looks at the commit message if there is only one commit, otherwise it looks at the PR title. At least, that's what is supposed to happen.

Did your experience not match that?

@kaicataldo

This comment has been minimized.

Copy link
Member Author

kaicataldo commented Sep 9, 2019

I’m not sure, to be honest! It was passing the commit message check and then started failing after I force pushed my changes with a third commit. Either way, looks like it’s fine now!

Copy link
Member

platinumazure left a comment

LGTM, thanks! I'd like another set of eyes on this before merging.

@kaicataldo kaicataldo force-pushed the fixes-12232 branch from f92352e to 9b4eba7 Sep 12, 2019
Copy link
Member

mysticatea left a comment

LGTM, thank you!

@ilyavolodin ilyavolodin merged commit db2a29b into master Sep 14, 2019
16 checks passed
16 checks passed
Verify Files
Details
Test (ubuntu-latest, 8.x)
Details
Test (ubuntu-latest, 10.x)
Details
Test (ubuntu-latest, 12.x)
Details
Test (windows-latest, 12.x)
Details
Test (macOS-latest, 12.x)
Details
Browser Test
Details
commit-message Commit message follows guidelines
Details
continuous-integration Build #20190912.12 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@ilyavolodin ilyavolodin deleted the fixes-12232 branch Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.