Editorial: Follow editorial conventions#3274
Merged
Conversation
e.g. a String value, a Number value, a BigInt value. As per editorial conventions https://github.com/tc39/ecma262/wiki/Editorial-Conventions#phrasing-conventions (Existing language in operations copied from ECMA-262 or ECMA-402 is left as is.)
https://github.com/tc39/ecma262/wiki/Editorial-Conventions#phrasing-conventions "to create an untagged union of types, - If all types are singletons, use A (for 1 type), either A or B (for 2), or one of A, B, or C (for 3+) - Else, use an A (for 1 type), either an A or a B (for 2), or either an A, a B, or a C (for 3+) where all types with >1 inhabitant are listed before all singletons"
As per editorial conventions, 'prefer "if a is either b or c" over "if a is b or a is c"; use "one of" in place of "either" when more than 2 options' https://github.com/tc39/ecma262/wiki/Editorial-Conventions#comparisons
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3274 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 22 22
Lines 10457 10457
Branches 1808 1808
=======================================
Hits 10258 10258
Misses 182 182
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ms2ger
approved these changes
Feb 10, 2026
As per editorial conventions, - in a single-line if/else, all branches should "do the same thing", e.g. set the same alias, return, perform, etc. - if an early-exiting if/else has just two branches (i.e. not an if-else cascade like in some Math functions), and the two branches are substantially similar and short, prefer a single step - if an early-exiting if/else has more than two branches (i.e. is an if-else cascade), prefer multi-step, without a leading Else, on successive branches https://github.com/tc39/ecma262/wiki/Editorial-Conventions#algorithm-conventions This is necessarily a bit fuzzy and based on best judgement.
9578e31 to
a969773
Compare
linusg
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I went through https://github.com/tc39/ecma262/wiki/Editorial-Conventions and attempted to make sure we conform to every one of them that was easily searchable or that I knew we had been doing differently in the past. This is in preparation for submitting a stage 4 PR.