{"action":"opened","issue":{"url":"https://api.github.com/repos/SublimeLinter/SublimeLinter-eslint/issues/262","repository_url":"https://api.github.com/repos/SublimeLinter/SublimeLinter-eslint","labels_url":"https://api.github.com/repos/SublimeLinter/SublimeLinter-eslint/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/SublimeLinter/SublimeLinter-eslint/issues/262/comments","events_url":"https://api.github.com/repos/SublimeLinter/SublimeLinter-eslint/issues/262/events","html_url":"https://github.com/SublimeLinter/SublimeLinter-eslint/issues/262","id":369988015,"node_id":"MDU6SXNzdWUzNjk5ODgwMTU=","number":262,"title":"eslint output not properly parsed in windows","user":{"login":"jackysee","id":30516,"node_id":"MDQ6VXNlcjMwNTE2","avatar_url":"https://avatars1.githubusercontent.com/u/30516?v=4","gravatar_id":"","url":"https://api.github.com/users/jackysee","html_url":"https://github.com/jackysee","followers_url":"https://api.github.com/users/jackysee/followers","following_url":"https://api.github.com/users/jackysee/following{/other_user}","gists_url":"https://api.github.com/users/jackysee/gists{/gist_id}","starred_url":"https://api.github.com/users/jackysee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackysee/subscriptions","organizations_url":"https://api.github.com/users/jackysee/orgs","repos_url":"https://api.github.com/users/jackysee/repos","events_url":"https://api.github.com/users/jackysee/events{/privacy}","received_events_url":"https://api.github.com/users/jackysee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T03:45:06Z","updated_at":"2018-10-15T03:45:06Z","closed_at":null,"author_association":"NONE","body":"Environment: Windows 10 / SublimeText 3.1.1 / node 10.11.0 / eslint 5.6.1\r\n\r\nThe eslint error pop out in console:\r\n```\r\nSublimeLinter: #3 eslint index.js ERROR:\r\n========================================\r\n\r\nJSON Decode error: We expected JSON from 'eslint', but instead got this:\r\napplying source-map option: eval-source-map\r\n\r\n[{\"filePath\":\"C:\\\\workspace\\\\MY-APP\\\\src\\\\index.js\",\"messages\":[],\"errorCount\":0,\"warningCount\":0,\"fixableErrorCount\":0,\"fixableWarningCount\":0}]\r\n\r\n\r\nBe aware that we only parse the last line of above output.\r\n```\r\nThis is due to the fact that my `.eslintrc.js` would call do `console.log` to have some debug message, so it prints the first line `applying source-map option: eval-source-map`. \r\n\r\nAccording to #251,  it should be fixed by reading only the last line. So the problem seems to be that the line `output.rstrip().split(os.linesep)[-1]` in `linter.py` is cannot split the output. \r\n\r\nI have tried to locally changed it to `output.rstrip().split('\\n')[-1]` and it works.  But I don't know if it's OS agnostic."}}
{"actor":{"display_login":"jackysee"}}