{"action":"created","issue":{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/20","labels_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/20/comments","events_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/20/events","html_url":"https://github.com/eHealthAfrica/eHealthAfrica.github.io/issues/20","id":88702488,"number":20,"title":"Coding styleguide and linting for JavaScript","user":{"login":"FrancescoK","id":919278,"avatar_url":"https://avatars.githubusercontent.com/u/919278?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescoK","html_url":"https://github.com/FrancescoK","followers_url":"https://api.github.com/users/FrancescoK/followers","following_url":"https://api.github.com/users/FrancescoK/following{/other_user}","gists_url":"https://api.github.com/users/FrancescoK/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescoK/subscriptions","organizations_url":"https://api.github.com/users/FrancescoK/orgs","repos_url":"https://api.github.com/users/FrancescoK/repos","events_url":"https://api.github.com/users/FrancescoK/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescoK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-06-16T11:46:25Z","updated_at":"2015-06-17T11:52:37Z","closed_at":null,"body":"Suggestion:\r\n\r\n- Adopt ESLint over JSHint+JSCS to have one tool only\r\n- Use ESLint [standard rulesets](http://eslint.org/docs/rules/), similar to what JSHint and JSCS provide\r\n- Set linting infringements to errors and style infringements to warnings, break build on error (linting) but not on warning (style)\r\n- Keep rather loose styleguide\r\n\r\nDiscussion:\r\n\r\n- Adopt [mgechev’s Angular styleguide](https://github.com/mgechev/angularjs-style-guide)? Was suggested/used in some projects.\r\n\r\nOther options: \r\n\r\n- [standard](https://www.npmjs.com/package/standard)\r\n- [semi-standard](https://www.npmjs.com/package/semistandard) (tl;dr semicolons!)\r\n- [Idiomatic.js](https://github.com/rwaldron/idiomatic.js) or the [Google styleguide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml),\r\n- [Pragmatic.js](https://github.com/stevekwan/best-practices/blob/master/javascript/best-practices.md)\r\n- etc."},"comment":{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/comments/112769110","html_url":"https://github.com/eHealthAfrica/eHealthAfrica.github.io/issues/20#issuecomment-112769110","issue_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/20","id":112769110,"user":{"login":"tlvince","id":323761,"avatar_url":"https://avatars.githubusercontent.com/u/323761?v=3","gravatar_id":"","url":"https://api.github.com/users/tlvince","html_url":"https://github.com/tlvince","followers_url":"https://api.github.com/users/tlvince/followers","following_url":"https://api.github.com/users/tlvince/following{/other_user}","gists_url":"https://api.github.com/users/tlvince/gists{/gist_id}","starred_url":"https://api.github.com/users/tlvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlvince/subscriptions","organizations_url":"https://api.github.com/users/tlvince/orgs","repos_url":"https://api.github.com/users/tlvince/repos","events_url":"https://api.github.com/users/tlvince/events{/privacy}","received_events_url":"https://api.github.com/users/tlvince/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T11:52:37Z","updated_at":"2015-06-17T11:52:37Z","body":"+1 on ESLint and +1 on reusing a popular style guide. I would suggest we drop in the [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) config and embellish it with our own [shareable config](http://eslint.org/docs/developer-guide/shareable-configs) *if* necessary (they're easy to do, e.g. [eslint-config-tlvince](https://github.com/tlvince/eslint-config-tlvince), but we should try to avoid it).\r\n\r\nFor Angular-specific rules, I've had some milage with [eslint-plugin-angular](https://github.com/Gillespie59/eslint-plugin-angular)."}}