{"action":"created","issue":{"url":"https://api.github.com/repos/jshint/jshint/issues/1849","labels_url":"https://api.github.com/repos/jshint/jshint/issues/1849/labels{/name}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/1849/comments","events_url":"https://api.github.com/repos/jshint/jshint/issues/1849/events","html_url":"https://github.com/jshint/jshint/issues/1849","id":43288696,"number":1849,"title":"ES6: arrow function + default parameters","user":{"login":"mhelvens","id":4012816,"avatar_url":"https://avatars.githubusercontent.com/u/4012816?v=3","gravatar_id":"","url":"https://api.github.com/users/mhelvens","html_url":"https://github.com/mhelvens","followers_url":"https://api.github.com/users/mhelvens/followers","following_url":"https://api.github.com/users/mhelvens/following{/other_user}","gists_url":"https://api.github.com/users/mhelvens/gists{/gist_id}","starred_url":"https://api.github.com/users/mhelvens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhelvens/subscriptions","organizations_url":"https://api.github.com/users/mhelvens/orgs","repos_url":"https://api.github.com/users/mhelvens/repos","events_url":"https://api.github.com/users/mhelvens/events{/privacy}","received_events_url":"https://api.github.com/users/mhelvens/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jshint/jshint/labels/ES6","name":"ES6","color":"5319e7"},{"url":"https://api.github.com/repos/jshint/jshint/labels/P2","name":"P2","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-09-19T22:19:53Z","updated_at":"2015-02-06T18:12:18Z","closed_at":"2015-02-06T17:57:08Z","body":"The ES6 standard allows for arrow functions to have default parameters, but jshint does not parse those correctly:\r\n\r\n    var fn = (options = {}) => { console.log(options); }\r\n\r\nThis may be related to #1657.\r\n\r\nI see how this is a tricky one to parse, because you don't know whether `(options = {})` is an expression or a formal parameter list until you reach `=>`. I am [given to understand](http://tc39wiki.calculist.org/es6/arrow-functions/) that LR(1) parsers should solve this by parsing the formal parameter list as a general expression, and then checking its structure in a separate stage of compilation."},"comment":{"url":"https://api.github.com/repos/jshint/jshint/issues/comments/73284995","html_url":"https://github.com/jshint/jshint/issues/1849#issuecomment-73284995","issue_url":"https://api.github.com/repos/jshint/jshint/issues/1849","id":73284995,"user":{"login":"Wildhoney","id":1528477,"avatar_url":"https://avatars.githubusercontent.com/u/1528477?v=3","gravatar_id":"","url":"https://api.github.com/users/Wildhoney","html_url":"https://github.com/Wildhoney","followers_url":"https://api.github.com/users/Wildhoney/followers","following_url":"https://api.github.com/users/Wildhoney/following{/other_user}","gists_url":"https://api.github.com/users/Wildhoney/gists{/gist_id}","starred_url":"https://api.github.com/users/Wildhoney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wildhoney/subscriptions","organizations_url":"https://api.github.com/users/Wildhoney/orgs","repos_url":"https://api.github.com/users/Wildhoney/repos","events_url":"https://api.github.com/users/Wildhoney/events{/privacy}","received_events_url":"https://api.github.com/users/Wildhoney/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T18:12:18Z","updated_at":"2015-02-06T18:12:18Z","body":"Lovely! :beers:"}}