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

fix example #2201

Open
wants to merge 1 commit into
base: master
from
Open

fix example #2201

wants to merge 1 commit into from

Conversation

@roshal
Copy link

roshal commented Mar 23, 2020

No description provided.

@roshal roshal force-pushed the roshal:master branch from 4921661 to 502aea1 Mar 23, 2020
@@ -957,8 +957,7 @@ Other Style Guides
```javascript
// bad
[1, 2, 3].map((number) => {
const nextNumber = number + 1;
`A string containing the ${nextNumber}.`;

This comment has been minimized.

Copy link
@ljharb

ljharb Mar 24, 2020

Collaborator

this change would get rid of the entire point of showing this bad example.

This comment has been minimized.

Copy link
@roshal

roshal Mar 26, 2020

Author

no it is not - returning a single expression in the function body violates the rule

this function is not valid without return

grim--20-03-26--04-41-44

This comment has been minimized.

Copy link
@ljharb

ljharb Mar 28, 2020

Collaborator

That is the whole point - that it is an invalid example according to the guide (although it's perfectly valid javascript without the return). See the // bad above it?

@ljharb ljharb added the editorial label Mar 24, 2020
@roshal roshal requested a review from ljharb Mar 27, 2020
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

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