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

Line breaks for multi-entry array #1733

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

Line breaks for multi-entry array #1733

wants to merge 1 commit into from

Conversation

@jfdnc
Copy link

jfdnc commented Feb 18, 2018

Description states, "Use line breaks after open and before close array brackets if an array has multiple lines," which would imply the form reflected in the edit. If the intention was actually to list the array as 'const arr = [[0, 1], [2, 3], [4, 5]];' a caveat should be added to 4.7 description, since it doesn't involve a line break after the opening or before the closing brackets.

Description states, "Use line breaks after open and before close array brackets if an array has multiple lines," which would imply the form reflected in the edit. If the intention was actually to list the array as 'const arr = [[0, 1], [2, 3], [4, 5]];' a caveat should be added to 4.7 description, since it doesn't involve a line break after the opening or before the closing brackets.
@@ -460,7 +460,11 @@ Other Style Guides
];
// good
const arr = [[0, 1], [2, 3], [4, 5]];
const arr = [

This comment has been minimized.

Copy link
@ljharb

ljharb Feb 18, 2018

Collaborator

this is intentional; this array doesn't have multiple lines, so there's no need to use line breaks - that's why it's a "good" example.

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.