{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6952","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6952/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6952/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6952/events","html_url":"https://github.com/eslint/eslint/pull/6952","id":172304229,"number":6952,"title":"Update: Add `none` option to `eol-last` (fixes #6938)","user":{"login":"kdex","id":4442505,"avatar_url":"https://avatars.githubusercontent.com/u/4442505?v=3","gravatar_id":"","url":"https://api.github.com/users/kdex","html_url":"https://github.com/kdex","followers_url":"https://api.github.com/users/kdex/followers","following_url":"https://api.github.com/users/kdex/following{/other_user}","gists_url":"https://api.github.com/users/kdex/gists{/gist_id}","starred_url":"https://api.github.com/users/kdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdex/subscriptions","organizations_url":"https://api.github.com/users/kdex/orgs","repos_url":"https://api.github.com/users/kdex/repos","events_url":"https://api.github.com/users/kdex/events{/privacy}","received_events_url":"https://api.github.com/users/kdex/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/CLA:%20Valid","name":"CLA: Valid","color":"007700"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2016-08-21T04:43:00Z","updated_at":"2016-09-03T15:51:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/6952","html_url":"https://github.com/eslint/eslint/pull/6952","diff_url":"https://github.com/eslint/eslint/pull/6952.diff","patch_url":"https://github.com/eslint/eslint/pull/6952.patch"},"body":"In short, `eol-last`'s behavior could thus far only enforce that files ended with an OS-specific EOL. The rule's negation (i.e. that files should not end with an EOL) wasn't possible.\r\n\r\nThis PR adds a `\"none\"` option to `eol-last` which adds a way to check that a file doesn't end with an EOL, which fixes issue #6938. Additionally, there's also a fixer and some tests.\r\n\r\nHere's a short overview of changes:\r\n- Replaced ternary check of options with object access\r\n- Initialized `location` with both `column` and `line` directly (note that `line` is now set by `sourceCode.lines.length` instead of performing a `.split(\"\\n\")`)\r\n- Divided `checkBadEOF`'s code flow into two paths, where one path treats different operating systems' EOLs just like before, while the other path treats enforcing their absence\r\n- Added a fixer that removes EOLs from the end of the file\r\n- Added some tests for `\"none\"` option\r\n- Extended `eol-last`'s documentation to mention `\"none\"`"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/244554058","html_url":"https://github.com/eslint/eslint/pull/6952#issuecomment-244554058","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6952","id":244554058,"user":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T15:51:12Z","updated_at":"2016-09-03T15:51:12Z","body":"Should \"none\" be \"never\" to match our other rules?"}}
{"actor":{"display_login":"nzakas"}}