{"action":"created","issue":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/504","repository_url":"https://api.github.com/repos/shelljs/shelljs","labels_url":"https://api.github.com/repos/shelljs/shelljs/issues/504/labels{/name}","comments_url":"https://api.github.com/repos/shelljs/shelljs/issues/504/comments","events_url":"https://api.github.com/repos/shelljs/shelljs/issues/504/events","html_url":"https://github.com/shelljs/shelljs/pull/504","id":169729673,"number":504,"title":"chore: switch to eslint","user":{"login":"nfischer","id":5801521,"avatar_url":"https://avatars.githubusercontent.com/u/5801521?v=3","gravatar_id":"","url":"https://api.github.com/users/nfischer","html_url":"https://github.com/nfischer","followers_url":"https://api.github.com/users/nfischer/followers","following_url":"https://api.github.com/users/nfischer/following{/other_user}","gists_url":"https://api.github.com/users/nfischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nfischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfischer/subscriptions","organizations_url":"https://api.github.com/users/nfischer/orgs","repos_url":"https://api.github.com/users/nfischer/repos","events_url":"https://api.github.com/users/nfischer/events{/privacy}","received_events_url":"https://api.github.com/users/nfischer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shelljs/shelljs/labels/chore","name":"chore","color":"000000"},{"url":"https://api.github.com/repos/shelljs/shelljs/labels/low%20priority","name":"low priority","color":"aaaaaa"},{"url":"https://api.github.com/repos/shelljs/shelljs/labels/refactor","name":"refactor","color":"008000"}],"state":"open","locked":false,"assignee":{"login":"ariporad","id":1817508,"avatar_url":"https://avatars.githubusercontent.com/u/1817508?v=3","gravatar_id":"","url":"https://api.github.com/users/ariporad","html_url":"https://github.com/ariporad","followers_url":"https://api.github.com/users/ariporad/followers","following_url":"https://api.github.com/users/ariporad/following{/other_user}","gists_url":"https://api.github.com/users/ariporad/gists{/gist_id}","starred_url":"https://api.github.com/users/ariporad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariporad/subscriptions","organizations_url":"https://api.github.com/users/ariporad/orgs","repos_url":"https://api.github.com/users/ariporad/repos","events_url":"https://api.github.com/users/ariporad/events{/privacy}","received_events_url":"https://api.github.com/users/ariporad/received_events","type":"User","site_admin":false},"assignees":[{"login":"ariporad","id":1817508,"avatar_url":"https://avatars.githubusercontent.com/u/1817508?v=3","gravatar_id":"","url":"https://api.github.com/users/ariporad","html_url":"https://github.com/ariporad","followers_url":"https://api.github.com/users/ariporad/followers","following_url":"https://api.github.com/users/ariporad/following{/other_user}","gists_url":"https://api.github.com/users/ariporad/gists{/gist_id}","starred_url":"https://api.github.com/users/ariporad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariporad/subscriptions","organizations_url":"https://api.github.com/users/ariporad/orgs","repos_url":"https://api.github.com/users/ariporad/repos","events_url":"https://api.github.com/users/ariporad/events{/privacy}","received_events_url":"https://api.github.com/users/ariporad/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-06T05:00:33Z","updated_at":"2016-08-06T20:34:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shelljs/shelljs/pulls/504","html_url":"https://github.com/shelljs/shelljs/pull/504","diff_url":"https://github.com/shelljs/shelljs/pull/504.diff","patch_url":"https://github.com/shelljs/shelljs/pull/504.patch"},"body":"Closes #317 \r\n\r\nThis switches us to using eslint instead of jshint, based off the airbnb style guide for es5.\r\n\r\n**Note**: Most of the changes were created by `eslint --fix`.\r\n\r\nI disabled linting rules whenever I encountered too many places where they would need fixing. Here are the rules I disabled (which we can go back and re-enable at our convenience):\r\n\r\n```\r\n    \"quote-props\": 0,\r\n    \"no-underscore-dangle\": 0,\r\n    \"max-len\": 0,\r\n    \"no-use-before-define\": 0,\r\n    \"no-empty\": 0,\r\n    \"no-else-return\": 0,\r\n    \"no-throw-literal\": 0,\r\n    \"newline-per-chained-call\": 0,\r\n    \"consistent-return\": 0,\r\n    \"no-mixed-operators\": 0,\r\n    \"no-prototype-builtins\": 0,\r\n```\r\n\r\nAny other refactors that I did manually should be mostly semantically equivalent to the way the code was before. Feel free to take your time reviewing, since there's the potential for things to change.\r\n\r\n - Any `for (key in obj)` loop was changed to `Object.keys(obj).forEach(function (key) {` (which I believe is slightly different semantically, but shouldn't have an effect on the intended usage).\r\n - I fixed some of the [`no-else-return`](http://eslint.org/docs/rules/no-else-return) errors, but ultimately disabled the rule.\r\n - I changed the nested ternary expression in `src/uniq.js` to be an else-if ladder for clarity.\r\n - I fixed some of the `consistent-return` errors, but ultimately disabled the rule (since `common.error()` actually does implicitly return a value).\r\n - I removed unnecessary character escaping (like `\\@` in `generate-docs.js`).\r\n - I added a `default` case to a switch statement in `chmod()` because it didn't have one.\r\n\r\nMake sure there's no semantic changes in the test files (I don't remember doing any intentionally)."},"comment":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/comments/238047431","html_url":"https://github.com/shelljs/shelljs/pull/504#issuecomment-238047431","issue_url":"https://api.github.com/repos/shelljs/shelljs/issues/504","id":238047431,"user":{"login":"nfischer","id":5801521,"avatar_url":"https://avatars.githubusercontent.com/u/5801521?v=3","gravatar_id":"","url":"https://api.github.com/users/nfischer","html_url":"https://github.com/nfischer","followers_url":"https://api.github.com/users/nfischer/followers","following_url":"https://api.github.com/users/nfischer/following{/other_user}","gists_url":"https://api.github.com/users/nfischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nfischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfischer/subscriptions","organizations_url":"https://api.github.com/users/nfischer/orgs","repos_url":"https://api.github.com/users/nfischer/repos","events_url":"https://api.github.com/users/nfischer/events{/privacy}","received_events_url":"https://api.github.com/users/nfischer/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T20:34:20Z","updated_at":"2016-08-06T20:34:20Z","body":"@ariporad do you know the eslint rule for that?"}}
{"actor":{"display_login":"nfischer"}}