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
{{ message }}
Repository navigation
Inconsistent semicolon usage in examples (Arrays vs Functions) #3152
(Readme.md)
I noticed an inconsistency in semicolon usage across different sections of the style guide.
In the Arrays section (4.1–4.8), many examples omit semicolons at the end of statements.
In the Functions section (7.1–7.7), the examples consistently use semicolons.
Since the Airbnb style guide explicitly recommends always using semicolons (see Section 21: Semicolons), this inconsistency might confuse developers who are following the guide.
Proposed Fix
Ensure that all code examples across the style guide consistently include semicolons at the end of statements.
For example:
// Current (Arrays section):constitems=[]// Suggested fix:constitems=[];I’dbehappytoworkonfixingthisifmaintainersagree.Couldyoupleaseassignthisissuetome?
I had a look as well. However, it seems consistent with Airbnb’s semicolon rule — the snippets without semicolons are just minimal examples, not a different style.
Using semicolons or omitting them wont make any difference because they are just coding standards that are followed according to coding norms of organization
Activity
ljharb commentedon Aug 21, 2025
Issues aren't ever assigned in open source.
This is a good thing to fix, yes - please do submit a PR.
NothingADSR123 commentedon Aug 27, 2025
I had a look as well. However, it seems consistent with Airbnb’s semicolon rule — the snippets without semicolons are just minimal examples, not a different style.
Chetan40101 commentedon Oct 25, 2025
Using semicolons or omitting them wont make any difference because they are just coding standards that are followed according to coding norms of organization
fix: use single quotes in nested ternary bad example (section 15.6)
[readme] use single quotes in nested ternary bad example (section 15.6)
Mahi1215 commentedon Jun 26, 2026