{"action":"created","issue":{"url":"https://api.github.com/repos/virtru/lint-trap/issues/23","labels_url":"https://api.github.com/repos/virtru/lint-trap/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/virtru/lint-trap/issues/23/comments","events_url":"https://api.github.com/repos/virtru/lint-trap/issues/23/events","html_url":"https://github.com/virtru/lint-trap/issues/23","id":130516396,"number":23,"title":"comma-dangle","user":{"login":"jwvirtru","id":15896071,"avatar_url":"https://avatars.githubusercontent.com/u/15896071?v=3","gravatar_id":"","url":"https://api.github.com/users/jwvirtru","html_url":"https://github.com/jwvirtru","followers_url":"https://api.github.com/users/jwvirtru/followers","following_url":"https://api.github.com/users/jwvirtru/following{/other_user}","gists_url":"https://api.github.com/users/jwvirtru/gists{/gist_id}","starred_url":"https://api.github.com/users/jwvirtru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwvirtru/subscriptions","organizations_url":"https://api.github.com/users/jwvirtru/orgs","repos_url":"https://api.github.com/users/jwvirtru/repos","events_url":"https://api.github.com/users/jwvirtru/events{/privacy}","received_events_url":"https://api.github.com/users/jwvirtru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T23:18:10Z","updated_at":"2016-02-01T23:37:24Z","closed_at":null,"body":"![](http://vignette2.wikia.nocookie.net/reno911/images/7/75/Dangle.jpg/revision/latest?cb=20090314230151)\r\n\r\nhttp://eslint.org/docs/rules/comma-dangle.html\r\n\r\nCurrently set to `off` for [backend](https://github.com/virtru/lint-trap/blob/master/lib/ci/backend.js#L4) and `error` for [frontend](https://github.com/virtru/lint-trap/blob/master/lib/ci/frontend.js#L4).\r\n\r\n### Proposed\r\nSet to `off` for frontend as well. From what I know we don't support IE < 9 anywhere ([SR ref](https://github.com/virtru/secure-reader/blob/master/src/templates/unsupported-browser.swig#L46)), and IE <= 8 is the impetus for this rule.\r\n\r\n#### Pros\r\n- Fewer errors caused by reordoring and appending object/array items\r\n- Diffs become cleaner (no change just to add a comma to the previous last item)\r\n- Catharsis. Having purposely dangled commas in both frontend and backend code on previous projects, it really does feel nice not to have to think about comma/no-comma depending on where in an object/array you are just because of legacy browsers.\r\n\r\n#### Cons\r\n- There may be some editors that will highlight dangles as errors\r\n- It's conceivable that someone would carry the dangling habit over into JSON files\r\n\r\n@virtru/employees RFC"},"comment":{"url":"https://api.github.com/repos/virtru/lint-trap/issues/comments/178257261","html_url":"https://github.com/virtru/lint-trap/issues/23#issuecomment-178257261","issue_url":"https://api.github.com/repos/virtru/lint-trap/issues/23","id":178257261,"user":{"login":"nzack","id":4009337,"avatar_url":"https://avatars.githubusercontent.com/u/4009337?v=3","gravatar_id":"","url":"https://api.github.com/users/nzack","html_url":"https://github.com/nzack","followers_url":"https://api.github.com/users/nzack/followers","following_url":"https://api.github.com/users/nzack/following{/other_user}","gists_url":"https://api.github.com/users/nzack/gists{/gist_id}","starred_url":"https://api.github.com/users/nzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzack/subscriptions","organizations_url":"https://api.github.com/users/nzack/orgs","repos_url":"https://api.github.com/users/nzack/repos","events_url":"https://api.github.com/users/nzack/events{/privacy}","received_events_url":"https://api.github.com/users/nzack/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T23:37:24Z","updated_at":"2016-02-01T23:37:24Z","body":"Personally, I think the trailing comma is just sloppy... don't feel too terribly strongly about it though.  my ide complains about it too, so that's annoying... but the ide reads the eslint config, so that would go away if we changed it.  Just for the love of God no leading comma, cause fuck that, and if anyone suggests it you deserve to be beaten and left in a ditch.\r\n\r\npros:\r\n-- syntax error, so caught early.\r\n-- one line... easy to see the change\r\n-- i hear ya\r\n\r\ncons:\r\n-- ide reads the config\r\n-- syntax error, caught early as well\r\n\r\nso ya, i don't feel strongly..\r\n\r\n"}}