{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2938","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2938/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2938/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2938/events","html_url":"https://github.com/eslint/eslint/issues/2938","id":93458360,"number":2938,"title":"The `valid-jsdoc` rule and jsdoc comments for fields.","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-07T07:17:34Z","updated_at":"2015-07-07T14:28:34Z","closed_at":null,"body":"I tried to write a jsdoc comment for a field, but the comment seems to be bonded to a function in its right hand expression.\r\n\r\nOn the following code, I expected the comment `\"Description for this.xs\"` is bonded to `this.xs`, but actually the comment seems to be bonded to `x => x != null`.\r\n\r\n```js\r\n/**\r\n * Description for A.\r\n */\r\nclass A {\r\n  /**\r\n   * Description for constructor.\r\n   * @param {object[]} xs - xs\r\n   */\r\n  constructor(xs) {\r\n    /**\r\n     * Description for this.xs;\r\n     * @type {object[]}\r\n     */\r\n    this.xs = xs.filter(x => x != null);\r\n  }\r\n}\r\n```\r\n\r\n----\r\n\r\n```\r\n> eslint -v\r\nv0.24.0\r\n> eslint test.js --env es6 --rule \"valid-jsdoc:[2,{requireReturn:false}]\" --reset --no-eslintrc\r\n```\r\n\r\n## Actual\r\n\r\n```\r\ntest.js\r\n  10:4  error  Missing JSDoc for parameter 'x'  valid-jsdoc\r\n\r\n✖ 1 problem (1 error, 0 warnings)\r\n```\r\n\r\n## Expected\r\n\r\nNo errors."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/119221293","html_url":"https://github.com/eslint/eslint/issues/2938#issuecomment-119221293","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2938","id":119221293,"user":{"login":"ilyavolodin","id":1380062,"avatar_url":"https://avatars.githubusercontent.com/u/1380062?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyavolodin","html_url":"https://github.com/ilyavolodin","followers_url":"https://api.github.com/users/ilyavolodin/followers","following_url":"https://api.github.com/users/ilyavolodin/following{/other_user}","gists_url":"https://api.github.com/users/ilyavolodin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyavolodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyavolodin/subscriptions","organizations_url":"https://api.github.com/users/ilyavolodin/orgs","repos_url":"https://api.github.com/users/ilyavolodin/repos","events_url":"https://api.github.com/users/ilyavolodin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyavolodin/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T14:28:34Z","updated_at":"2015-07-07T14:28:34Z","body":"Could be related to either https://github.com/eslint/espree/issues/155 or https://github.com/eslint/espree/issues/136"}}