{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5108","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-framework","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5108/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5108/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5108/events","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/5108","id":137216465,"number":5108,"title":"JavaScript Standard Style","user":{"login":"chillu","id":111025,"avatar_url":"https://avatars.githubusercontent.com/u/111025?v=3","gravatar_id":"","url":"https://api.github.com/users/chillu","html_url":"https://github.com/chillu","followers_url":"https://api.github.com/users/chillu/followers","following_url":"https://api.github.com/users/chillu/following{/other_user}","gists_url":"https://api.github.com/users/chillu/gists{/gist_id}","starred_url":"https://api.github.com/users/chillu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chillu/subscriptions","organizations_url":"https://api.github.com/users/chillu/orgs","repos_url":"https://api.github.com/users/chillu/repos","events_url":"https://api.github.com/users/chillu/events{/privacy}","received_events_url":"https://api.github.com/users/chillu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-02-29T10:45:30Z","updated_at":"2016-03-02T00:49:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5108","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/5108","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/5108.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/5108.patch"},"body":"Introduce https://github.com/feross/standard. While the CMS JS will be rewritten to ES6 over time, I think it's still important to get all of it over into a modern development flow - and that starts with linting and coding standards. I'm hoping to avoid a discussion about semistandard vs. standard ;)\r\n\r\nMost of the syntax changes were performed automatically through `standard --format`. I've fixed up mainly `var` declarations. The main risk here are manual conversions to type-safe comparators (`===` instead of `==`), but I've reviewed each use case before fixing. Overall, I think we have good enough Behat test coverage to catch out any serious regressions, plus we're still a fair bit away from a stable release on 4.0, giving us a chance to clean things up.\r\n\r\n@flashbackzoo Yes, this is going to complicate merges from https://github.com/open-sausages/silverstripe-framework/tree/integrate-react, happy to help with the rebase on that. Better now than never.\r\n\r\nThe standards aren't enforced through CI here yet, but keen to do that soon (before the new asset-admin work gets merged).\r\n\r\nMerge together with https://github.com/silverstripe/silverstripe-cms/pull/1405.\r\n\r\nRelies on https://github.com/silverstripe/silverstripe-framework/pull/5106 merged first (shrinkwrap changes).\r\n\r\n/cc @unclecheese @flashbackzoo "},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments/190995774","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/5108#issuecomment-190995774","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5108","id":190995774,"user":{"login":"sminnee","id":59968,"avatar_url":"https://avatars.githubusercontent.com/u/59968?v=3","gravatar_id":"","url":"https://api.github.com/users/sminnee","html_url":"https://github.com/sminnee","followers_url":"https://api.github.com/users/sminnee/followers","following_url":"https://api.github.com/users/sminnee/following{/other_user}","gists_url":"https://api.github.com/users/sminnee/gists{/gist_id}","starred_url":"https://api.github.com/users/sminnee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sminnee/subscriptions","organizations_url":"https://api.github.com/users/sminnee/orgs","repos_url":"https://api.github.com/users/sminnee/repos","events_url":"https://api.github.com/users/sminnee/events{/privacy}","received_events_url":"https://api.github.com/users/sminnee/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T00:49:23Z","updated_at":"2016-03-02T00:49:23Z","body":"...okay, semistandard is 11k downloads/month and standard is 150k downloads/month. The JS community hates semicolons."}}