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
[19.16] changed Enforce to avoid #1946
Conversation
Good practice is to avoid spaces between functions and their invocations. But by mistake (I think so) you used the word Enforce instead of Avoid
@@ -2781,7 +2781,7 @@ Other Style Guides | |||
``` | |||
|
|||
<a name="whitespace--func-call-spacing"></a> | |||
- [19.16](#whitespace--func-call-spacing) Enforce spacing between functions and their invocations. eslint: [`func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) | |||
- [19.16](#whitespace--func-call-spacing) Avoid spaces between functions and their invocations. eslint: [`func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforce is correct; we’re enforcing “no spaces”.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Enforce spacing' is little confusing, As It's not clear whether to add spaces or not. Although Example definitely makes this clear or one have to check the eslint doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples and the linter config should make it clear; "enforce no spaces" or "enforce spaces" would both be correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" Enforce no spaces" or "Avoid spaces" makes it more cleaner than "Enforce spaces". Actually "Enforce spaces" does not make sense when we are enforcing "no spaces", while we are not strictly telling people to check the lint config. "Enforce no spaces" is good ( If we really want to stick with 'enforce' ). The guide is mostly self explanatory and this change will help to keep it intact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While "enforce spaces" is perfectly correct, this change is also correct, so if it's more clear to you, let's go with it.
It's fine now ! |
This change adds clarity and creates consistency with 19.15 & 19.17 - see airbnb#1946. Per the discussion in issue airbnb#2127, this "enforce" means to "avoid".
Good practice is to avoid spaces between functions and their invocations. But by mistake (I think so) you used the word Enforce instead of Avoid