nzakas/eslint — pull request #87 by iancmyers (2013-07-19 05:40:34+00:00)
Title: Created no-dangle rule.

Created the `no-dangle` rule, which warns when it encounters a trailing comma in an object literal. The following will raise warnings:

```js
var foo = {
bar: "baz",
};
```

I've accomplished trailing comma detection by doing a regex match on the `ObjectExpression` node source. I investigated inspecting the `ObjectExpression`'s properties, however they don't seem to contain any comma information. This seemed like the best possible way to get this rule, but I'd love to hear if there's a better approach.

I've defaulted `no-dangle` to on, because trailing commas will cause errors in IE, so it seemed like a sane default.

Fixes issue #13