-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: more punctuation consistification issues #243
Comments
Is there a clear preference that we want? I'm happy to make everything consistent, but unless I'm told "pick your favorite" i'd rather go with the consensus. |
From HTML:
The above generally reads well to me and is what @domenic advocated we use in WHATWG if I remember correctly. Streams uses the same style. |
To rephrase and make sure I'm reading properly:
? That makes sense to me; I'll begin to prepare a patch. |
That looks correct, except for |
Got it, updated my rephrasing. |
I opened #1143 to handle most of it; I couldn't find a practical regex to use to locate "abstract op invocations" with improper spacing. |
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
This is all fine by me except records, which don't need space between the record name and |
Also, if there is an effort at a broad alignment, make sure to include the directed operation syntax . |
@bterlson do you mean only for named records, or also for |
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
With #1143, and a number of previous PRs, the only remaining item for this issue might be spacing around abstract operation invocations. Can someone review, and confirm/correct? |
The discussion in issue tc39#243 doesn't say what to do when a parameter list or argument list is empty. It seems reasonable to infer that - an empty parameter list (in a definition) should have one space between the parens, and - an empty argument list (in an invocation) should have zero spaces between the parens. Which is mostly what the spec does already. This commit fixes a few spots where it doesn't.
Abstract operation, internal method, and job declarations use variable spacing in their parameter lists. Sometimes Name(foo, bar), sometimes Name( foo, bar ), and sometimes Name ( foo, bar ), along with other variations that are presumably typos.
Record creation of various types uses different spacing as well: Record{[[foo]]: bar}, Record {[[foo]]: bar}, Record { [[foo]]: bar }, etc. Be sure not to just search for Record though; it applies to e.g. property attributes, "the record", and other record types like PropertyDescriptor or Completion.
Abstract operation/internal method/job declarations use a variety of ways of declaring optional parameters. Sometimes the comma is inside the brackets (Map.prototype.forEach), sometimes outside (Call, Construct), and most of the time optional arguments are not bracketed at all (CreateMutableBinding).
The text was updated successfully, but these errors were encountered: