{"action":"created","issue":{"url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/4","repository_url":"https://api.github.com/repos/andreogle/eslint-teamcity","labels_url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/4/comments","events_url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/4/events","html_url":"https://github.com/andreogle/eslint-teamcity/pull/4","id":187615443,"number":4,"title":"Catch errors reading package.json file","user":{"login":"bradchristensen","id":6006249,"avatar_url":"https://avatars.githubusercontent.com/u/6006249?v=3","gravatar_id":"","url":"https://api.github.com/users/bradchristensen","html_url":"https://github.com/bradchristensen","followers_url":"https://api.github.com/users/bradchristensen/followers","following_url":"https://api.github.com/users/bradchristensen/following{/other_user}","gists_url":"https://api.github.com/users/bradchristensen/gists{/gist_id}","starred_url":"https://api.github.com/users/bradchristensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradchristensen/subscriptions","organizations_url":"https://api.github.com/users/bradchristensen/orgs","repos_url":"https://api.github.com/users/bradchristensen/repos","events_url":"https://api.github.com/users/bradchristensen/events{/privacy}","received_events_url":"https://api.github.com/users/bradchristensen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-07T03:02:14Z","updated_at":"2016-11-07T09:29:04Z","closed_at":"2016-11-07T08:50:35Z","pull_request":{"url":"https://api.github.com/repos/andreogle/eslint-teamcity/pulls/4","html_url":"https://github.com/andreogle/eslint-teamcity/pull/4","diff_url":"https://github.com/andreogle/eslint-teamcity/pull/4.diff","patch_url":"https://github.com/andreogle/eslint-teamcity/pull/4.patch"},"body":"The package.json file may not necessarily exist in the same directory as where eslint or gulp-eslint is run from.\r\n\r\nFor example, in our case we share node modules between multiple folders as below:\r\n```\r\n- package.json\r\n- subfolder\r\n  |- gulpfile.js\r\n- subfolder\r\n  |- gulpfile.js\r\n```\r\n\r\nThis fix simply wraps the package.json read in a try/catch as it suits our purposes, however a more thorough fix would be to traverse parent directories until a package.json is found, like node does to resolve the node_modules directory."},"comment":{"url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/comments/258786129","html_url":"https://github.com/andreogle/eslint-teamcity/pull/4#issuecomment-258786129","issue_url":"https://api.github.com/repos/andreogle/eslint-teamcity/issues/4","id":258786129,"user":{"login":"bradchristensen","id":6006249,"avatar_url":"https://avatars.githubusercontent.com/u/6006249?v=3","gravatar_id":"","url":"https://api.github.com/users/bradchristensen","html_url":"https://github.com/bradchristensen","followers_url":"https://api.github.com/users/bradchristensen/followers","following_url":"https://api.github.com/users/bradchristensen/following{/other_user}","gists_url":"https://api.github.com/users/bradchristensen/gists{/gist_id}","starred_url":"https://api.github.com/users/bradchristensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradchristensen/subscriptions","organizations_url":"https://api.github.com/users/bradchristensen/orgs","repos_url":"https://api.github.com/users/bradchristensen/repos","events_url":"https://api.github.com/users/bradchristensen/events{/privacy}","received_events_url":"https://api.github.com/users/bradchristensen/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T09:29:03Z","updated_at":"2016-11-07T09:29:03Z","body":"Thanks @andreogle :smiley:"}}
{"actor":{"display_login":"bradchristensen"}}