Closed Bug 449253 Opened 16 years ago Closed 5 years ago

Warning for trailing comma in Object literals

Categories

(Rhino Graveyard :: Core, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: apeller, Unassigned)

Details

As a follow-on to #378790, please consider a warning in strict mode for trailing comma in Object or Array literals.  Although legal, it is arguably bad form to code this in hand-crafted data and is known not to parse on at least one leading browser.  It would be helpful to have a warning to avoid this common pitfall.  In Dojo, we use Rhino to parse our code on check-in to help catch JS syntax and style issues.
Possibly resolve as WONTFIX now that ES5 officially allows trailing comma in ObjectLiteral? Trailing comma in ArrayLiteral was allowed back to ES3, ES5 only clarified the exact meaning, if I recall correctly.

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.