Skip to content

Commit b47708a

Browse files
committed
fixup! Meta: Add naming conventions section in style guide
1 parent 09b40ef commit b47708a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/style-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ This section provides guidelines for naming conventions in ECMA-402, focusing on
242242

243243
#### Guidelines
244244

245-
- Use full, descriptive names for properties and values, even if they are longer.
245+
- Use full, descriptive names for properties and values, even if they are longer (good examples: `fractionalSecondDigits`, `minimumSignificantDigits`).
246246
- Avoid cryptic abbreviations or shortened forms that may confuse readers or developers unfamiliar with the context.
247247
- Prioritize clarity over brevity, especially for properties that are frequently used or have significant impact.
248248

@@ -263,15 +263,15 @@ This section provides guidelines for naming conventions in ECMA-402, focusing on
263263

264264
#### Guidelines
265265

266-
- Use camelCase for property names and values that are compound words.
267-
- Avoid separating words with underscores, hyphens, or other delimiters.
268-
- For values only, nonzero numbers should be expressed as digits (as in `"h23"`).
266+
- Use camelCase for property names and values that are compound words (good examples: `signDisplay`, `"exceptZero"`).
267+
- Avoid separating words with underscores, hyphens, or other delimiters (historical exceptions: "2-digit", "best fit").
268+
- For values only, nonzero numbers should be expressed as digits (as in `"min2"`). Note that some terms, such as `"h23"`, originate from external specifications like UTS 35.
269269

270270
#### Rationale
271271

272272
- camelCase is a widely accepted convention in JavaScript and aligns with existing ECMA-402 practices.
273273
- Using digits for nonzero numbers in values ensures brevity and consistency with historical conventions.
274274

275-
### Open Question: "[...]style" vs. "[...]display" for High-Level Configuration Properties
275+
### Open Question: `Style` vs. `Display` for High-Level Configuration Properties
276276

277-
There is an open question regarding the naming of high-level configuration properties: should we prefer the suffix `[...]style` or `[...]display`? They're both used relatively interchangably. We must analyze this problem space in TG2 and come up with a convention.
277+
There is an open question regarding the naming of high-level configuration properties: should we prefer to name them like `…Style` or `…Display`? They're both used relatively interchangably (e.g., `style`/`dateStyle`/`timeStyle` vs. `compactDisplay`/ `signDisplay`/`unitDisplay`). We must analyze this problem space in TG2 and come up with a convention.

0 commit comments

Comments
 (0)