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

[19.16] changed Enforce to avoid #1946

Merged
merged 1 commit into from Nov 5, 2018
Merged

[19.16] changed Enforce to avoid #1946

merged 1 commit into from Nov 5, 2018

Conversation

theBstar
Copy link
Contributor

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

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)
Copy link
Collaborator

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”.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

@theBstar theBstar Oct 31, 2018

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.

Copy link
Collaborator

@ljharb ljharb left a 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.

@ljharb ljharb merged commit 41a13e8 into airbnb:master Nov 5, 2018
@theBstar
Copy link
Contributor Author

theBstar commented Nov 6, 2018

It's fine now !

@theBstar theBstar deleted the patch-1 branch December 6, 2018 02:42
mindyzwan added a commit to mindyzwan/javascript that referenced this pull request Jul 15, 2021
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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants