{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2051","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2051/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2051/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2051/events","html_url":"https://github.com/eslint/eslint/issues/2051","id":61889170,"number":2051,"title":"valid-jsdoc fails on functions that use ES6 destructuring assignment in signature","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"labels":[{"id":131106229,"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc","default":false},{"id":45711350,"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929","default":true},{"id":45798639,"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2015-03-15T19:47:36Z","updated_at":"2016-11-19T01:14:40Z","closed_at":"2015-03-28T17:05:55Z","body":"Given the following code:\n\n``` js\n/**\n * @param {object} options\n * @return {number}\n */\nconst test = function({ a, b, c }) {\n  return a + b + c;\n};\nmodule.exports = test;\n```\n\nThe `valid-jsdoc` rule fails with the following message:\n\n> Expected JSDoc for 'undefined' but found 'options'. (valid-jsdoc)\n\nChanging the variable name in the `@param` tag to \"undefined\" doesn't work either.\n\nESLint 0.17.0\n## <bountysource-plugin>\n\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9594576-valid-jsdoc-fails-on-functions-that-use-es6-destructuring-assignment-in-signature?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\n</bountysource-plugin>\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/261681871","html_url":"https://github.com/eslint/eslint/issues/2051#issuecomment-261681871","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2051","id":261681871,"user":{"login":"chrismcleod","id":1134683,"avatar_url":"https://avatars.githubusercontent.com/u/1134683?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismcleod","html_url":"https://github.com/chrismcleod","followers_url":"https://api.github.com/users/chrismcleod/followers","following_url":"https://api.github.com/users/chrismcleod/following{/other_user}","gists_url":"https://api.github.com/users/chrismcleod/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismcleod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismcleod/subscriptions","organizations_url":"https://api.github.com/users/chrismcleod/orgs","repos_url":"https://api.github.com/users/chrismcleod/repos","events_url":"https://api.github.com/users/chrismcleod/events{/privacy}","received_events_url":"https://api.github.com/users/chrismcleod/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T01:14:40Z","updated_at":"2016-11-19T01:14:40Z","body":"the reason i do it is to get something akin to ruby's named parameters.   Destructuring in the signature lets me refer to the parameters by name without having to reassign them or go through some other object.  If you use something like typescript, destructuring in the method signature allows you to type the properties of a **config** parameter without having to define a custom type."}}
{"actor":{"display_login":"chrismcleod"}}