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

Docs: clarify that space-unary-ops doesn't apply when space is required #13767

Merged
merged 3 commits into from Oct 19, 2020

Conversation

@tmdesigned
Copy link
Contributor

@tmdesigned tmdesigned commented Oct 17, 2020

Prerequisites checklist

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

[x] Documentation update
[ ] 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:

What changes did you make? (Give an overview)

Updated docs for space-unary-ops to clarify that the words operators are only considered when a space is not required for proper syntax.

This was previous confusing, as the "incorrect" examples were ones that had optional spaces (i.e. delete(foo)) while the "correct" examples were ones that required spaces anyways (i.e. new Foo). Therefore, in addition to a note under the rule description, the examples were modified to more closely mirror each other to make the actual rule clearer.

Is there anything you'd like reviewers to focus on?

@eslint eslint bot added the triage label Oct 17, 2020
@eslint
Copy link
Contributor

@eslint eslint bot commented Oct 17, 2020

Hi @tmdesigned!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.

  • The length of the commit message must be less than or equal to 72

Read more about contributing to ESLint here

@tmdesigned tmdesigned changed the title Docs: clarify that space-unary-ops does not apply when space is syntactically required Docs: clarify that space-unary-ops doesn't apply when space is required Oct 17, 2020
@kaicataldo kaicataldo closed this Oct 18, 2020
@kaicataldo kaicataldo reopened this Oct 18, 2020
@kaicataldo
Copy link
Member

@kaicataldo kaicataldo commented Oct 18, 2020

Closed and reopened to fix the CLA check.

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Oct 19, 2020

Thanks for the PR!

while the "correct" examples were ones that required spaces anyways (i.e. new Foo)

Completely agree, the correct examples for words were not very useful.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

This clarifies a lot, thanks! I just have a note about the added incorrect example.

docs/rules/space-unary-ops.md Outdated Show resolved Hide resolved
@tmdesigned tmdesigned requested a review from mdjermanovic Oct 19, 2020
Copy link
Member

@mdjermanovic mdjermanovic left a comment

LGTM, thanks!

Copy link
Member

@kaicataldo kaicataldo left a comment

Thank you!

@kaicataldo kaicataldo merged commit 1faeb84 into eslint:master Oct 19, 2020
12 checks passed
12 checks passed
Verify Files
Details
Test (ubuntu-latest, 14.x)
Details
Test (ubuntu-latest, 13.x)
Details
Test (ubuntu-latest, 12.x)
Details
Test (ubuntu-latest, 10.x)
Details
Test (ubuntu-latest, 10.12.0)
Details
Test (windows-latest, 12.x)
Details
Test (macOS-latest, 12.x)
Details
Browser Test
Details
commit-message PR title follows commit message guidelines
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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