rspec/rules/S1537/rule.adoc

28 lines
499 B
Plaintext

== Why is this an issue?
Most browsers parse and discard a meaningless, trailing comma. Unfortunately, that's not the case for Internet Explorer below version 9, which throws a meaningless error. Therefore trailing commas should be eliminated.
=== Noncompliant code example
[source,text]
----
var settings = {
'foo' : oof,
'bar' : rab, // Noncompliant - trailing comma
};
----
=== Compliant solution
[source,text]
----
var settings = {
'foo' : oof,
'bar' : rab
};
----