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

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-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Oct 17, 2020
@eslint-deprecated
Copy link

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

Closed and reopened to fix the CLA check.

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Oct 19, 2020
@mdjermanovic
Copy link
Member

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kaicataldo kaicataldo merged commit 1faeb84 into eslint:master Oct 19, 2020
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 18, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 documentation Relates to ESLint's documentation rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants