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

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

There is a newer version: 10.17.0.28100
Show newest version

This rule is deprecated, and will eventually be removed.

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

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

Compliant solution

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy