{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5563","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5563/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5563/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5563/events","html_url":"https://github.com/eslint/eslint/issues/5563","id":140501669,"number":5563,"title":"ignoreTrailingComments option for max-len not being respected","user":{"login":"ksmithut","id":1906967,"avatar_url":"https://avatars.githubusercontent.com/u/1906967?v=3","gravatar_id":"","url":"https://api.github.com/users/ksmithut","html_url":"https://github.com/ksmithut","followers_url":"https://api.github.com/users/ksmithut/followers","following_url":"https://api.github.com/users/ksmithut/following{/other_user}","gists_url":"https://api.github.com/users/ksmithut/gists{/gist_id}","starred_url":"https://api.github.com/users/ksmithut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksmithut/subscriptions","organizations_url":"https://api.github.com/users/ksmithut/orgs","repos_url":"https://api.github.com/users/ksmithut/repos","events_url":"https://api.github.com/users/ksmithut/events{/privacy}","received_events_url":"https://api.github.com/users/ksmithut/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-13T16:22:47Z","updated_at":"2016-03-15T18:10:57Z","closed_at":null,"body":"<!--\r\nThis template is for bug reports. If you are reporting a bug, please continue on. If you are here for another reason, please see below:\r\n\r\n1. To propose a new rule: http://eslint.org/docs/developer-guide/contributing/new-rules\r\n2. To request a change: http://eslint.org/docs/developer-guide/contributing/changes\r\n3. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint\r\n\r\nNote that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.\r\n-->\r\n\r\n**What version of ESLint are you using?** 2.3.0\r\n\r\n**What parser (default, Babel-ESLint, etc.) are you using?** default\r\n\r\n**Please show your full configuration:**\r\n\r\n```js\r\nmodule.exports = {\r\n  rules: {\r\n    'max-len': [ 2, {\r\n      code: 80,\r\n      tabWidth: 2,\r\n      ignoreUrls: true,\r\n      ignoreTrailingComments: true\r\n    }]\r\n  }\r\n}\r\n```\r\n\r\n**What did you do? Please include the actual source code causing the issue.**\r\n\r\n```js\r\n'use strict'\r\n\r\nmodule.exports = {\r\n  env: 'NODE_ENV' // This sets the config.get('env') to whatever NODE_ENV is set to\r\n}\r\n```\r\n\r\n**What did you expect to happen?**\r\n\r\nI expected there to not be an eslint error because I've set `ignoreTrailingComments` to `true`, which from the docs means:\r\n\r\n> Only ignores comments that are trailing source.\r\n\r\n**What actually happened? Please include the actual, raw output from ESLint.**\r\n\r\nESLint reported an error. It seems to not be respecting the `ignoreTrailingComments` rule\r\n\r\n```\r\n  4:1  error  Line 4 exceeds the maximum line length of 80  max-len\r\n```"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/196954603","html_url":"https://github.com/eslint/eslint/issues/5563#issuecomment-196954603","issue_url":"https://api.github.com/repos/eslint/eslint/issues/5563","id":196954603,"user":{"login":"pvamshi","id":1425006,"avatar_url":"https://avatars.githubusercontent.com/u/1425006?v=3","gravatar_id":"","url":"https://api.github.com/users/pvamshi","html_url":"https://github.com/pvamshi","followers_url":"https://api.github.com/users/pvamshi/followers","following_url":"https://api.github.com/users/pvamshi/following{/other_user}","gists_url":"https://api.github.com/users/pvamshi/gists{/gist_id}","starred_url":"https://api.github.com/users/pvamshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvamshi/subscriptions","organizations_url":"https://api.github.com/users/pvamshi/orgs","repos_url":"https://api.github.com/users/pvamshi/repos","events_url":"https://api.github.com/users/pvamshi/events{/privacy}","received_events_url":"https://api.github.com/users/pvamshi/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T18:10:57Z","updated_at":"2016-03-15T18:10:57Z","body":"I am trying to fix this. This is my first contribution, so I won't mind if anyone fixes sooner than me . The issue is on this line ( max-len.js, line : 121 ): \r\n`            comments = ignoreComments || maxCommentLength ? context.getAllComments() : [],\r\n`\r\n\r\n `ignoreComments` = false and `maxCommentLength` = undefined , So `comments` is empty array and stripTrailingComments is not performed. I am trying to figure out what is the correct way to fix it. "}}