You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/style-guide.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,7 +242,7 @@ This section provides guidelines for naming conventions in ECMA-402, focusing on
242
242
243
243
#### Guidelines
244
244
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`).
246
246
- Avoid cryptic abbreviations or shortened forms that may confuse readers or developers unfamiliar with the context.
247
247
- Prioritize clarity over brevity, especially for properties that are frequently used or have significant impact.
248
248
@@ -263,15 +263,15 @@ This section provides guidelines for naming conventions in ECMA-402, focusing on
263
263
264
264
#### Guidelines
265
265
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.
269
269
270
270
#### Rationale
271
271
272
272
- camelCase is a widely accepted convention in JavaScript and aligns with existing ECMA-402 practices.
273
273
- Using digits for nonzero numbers in values ensures brevity and consistency with historical conventions.
274
274
275
-
### Open Question: "[...]style" vs. "[...]display" for High-Level Configuration Properties
275
+
### Open Question: `Style` vs. `Display` for High-Level Configuration Properties
276
276
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