All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.javascript.rules.javascript.TrailingComma.html Maven / Gradle / Ivy

Most browsers parse and discard a meaningless, trailing comma. Unfortunately, that's not the case for Internet Explorer, which in most versions throws a meaningless error. Therefore trailing commas should be eliminated.

Noncompliant Code Example

var settings = {
    'foo'  : oof,
    'bar' : rab,    // Noncompliant - trailing comma
};

Compliant Solution

var settings = {
    'foo'  : oof,
    'bar' : rab
};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy