{"action":"created","issue":{"url":"https://api.github.com/repos/impress/impress.js/issues/529","repository_url":"https://api.github.com/repos/impress/impress.js","labels_url":"https://api.github.com/repos/impress/impress.js/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/impress/impress.js/issues/529/comments","events_url":"https://api.github.com/repos/impress/impress.js/issues/529/events","html_url":"https://github.com/impress/impress.js/issues/529","id":138664558,"number":529,"title":"Code style decision","user":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-05T09:32:38Z","updated_at":"2016-03-06T12:56:23Z","closed_at":null,"body":"In this issue we should discuss how we are going to handle code style.\r\n\r\nThis is not for a discussion of \"spaces vs tabs\" or \"semicolon or not\", this assumes that the value on code style lies in the consistency, so there are some alternatives here:\r\n\r\n1. Pick whatever standard is most used in the codebase right now and stick to it, later using an automated tool like JSCS if we want to automate it (for now we try to fix in code review until we automate it). If a standard cannot be infered by the `impress.js` file or `index.html` file, then we can just choose one.\r\n\r\n2. Use a code style that already exists (airbnb, standard, semistandard, jquery core style, etc.)\r\n\r\nProposal 1 will take more time, but the team will be more comfortable. Proposal 2 prevents unnecessary bikeshedding, but the team might be a little uncomfortable.\r\n\r\nSo, should we use proposal 1 or proposal 2. Do you have another proposal?\r\n\r\n@impress/mergers "},"comment":{"url":"https://api.github.com/repos/impress/impress.js/issues/comments/192885041","html_url":"https://github.com/impress/impress.js/issues/529#issuecomment-192885041","issue_url":"https://api.github.com/repos/impress/impress.js/issues/529","id":192885041,"user":{"login":"bartaz","id":83575,"avatar_url":"https://avatars.githubusercontent.com/u/83575?v=3","gravatar_id":"","url":"https://api.github.com/users/bartaz","html_url":"https://github.com/bartaz","followers_url":"https://api.github.com/users/bartaz/followers","following_url":"https://api.github.com/users/bartaz/following{/other_user}","gists_url":"https://api.github.com/users/bartaz/gists{/gist_id}","starred_url":"https://api.github.com/users/bartaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartaz/subscriptions","organizations_url":"https://api.github.com/users/bartaz/orgs","repos_url":"https://api.github.com/users/bartaz/repos","events_url":"https://api.github.com/users/bartaz/events{/privacy}","received_events_url":"https://api.github.com/users/bartaz/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T12:56:23Z","updated_at":"2016-03-06T12:56:23Z","body":"For sure the biggest value of code style is in consistency. Rest is details and preference.\r\n\r\nCode style I used in original impress.js code is quite dated, somehow based on jQuery (at least how it looked then) and it already evolved for me and I would do it differently now.\r\n\r\nThe biggest change to do (already mentioned in #453) is use of whitespace. At time of writing impress.js I thought it would be cool to use whitespace to keep indentation even in empty lines. It looked nice when having visible whitespace in editor. But it's quite painful to maintain, especially that even git itself complains about it and most of editors have an option to automatically remove trailing white space. And I do it now.\r\nSo for sure I would vote for no trailing white space and change that in current code base.\r\n\r\nApart from that I don't have much preference. Especially that it's quite likely I won't be the one writing code. Still it should be full proof (end lines with semicolons, etc) and readable. It would be helpful to have some automatic check and just use a code style that is default or easy to configure in some tool. I was just using jshint (which doesn't do much code style checks).\r\n\r\nSo I guess I would be more towards 2nd option - to choose something existing and adopt it, rather than having discussions on our own style and need to document it."}}