{"action":"created","issue":{"url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/96","repository_url":"https://api.github.com/repos/esbenp/prettier-vscode","labels_url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/96/comments","events_url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/96/events","html_url":"https://github.com/esbenp/prettier-vscode/issues/96","id":225365891,"number":96,"title":"\"prettier.eslintIntegration\": true causes error","user":{"login":"AndrewRayCode","id":79215,"avatar_url":"https://avatars3.githubusercontent.com/u/79215?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewRayCode","html_url":"https://github.com/AndrewRayCode","followers_url":"https://api.github.com/users/AndrewRayCode/followers","following_url":"https://api.github.com/users/AndrewRayCode/following{/other_user}","gists_url":"https://api.github.com/users/AndrewRayCode/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewRayCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewRayCode/subscriptions","organizations_url":"https://api.github.com/users/AndrewRayCode/orgs","repos_url":"https://api.github.com/users/AndrewRayCode/repos","events_url":"https://api.github.com/users/AndrewRayCode/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewRayCode/received_events","type":"User","site_admin":false},"labels":[{"id":515505041,"url":"https://api.github.com/repos/esbenp/prettier-vscode/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-01T00:28:42Z","updated_at":"2017-05-31T10:18:22Z","closed_at":null,"body":"Format document with `\"prettier.eslintIntegration\": true` causes \"Path must be a string. Received undefined\". I have prettier-eslint installed in my project's node_modules directory."},"comment":{"url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/comments/305148702","html_url":"https://github.com/esbenp/prettier-vscode/issues/96#issuecomment-305148702","issue_url":"https://api.github.com/repos/esbenp/prettier-vscode/issues/96","id":305148702,"user":{"login":"Florian-R","id":1374176,"avatar_url":"https://avatars0.githubusercontent.com/u/1374176?v=3","gravatar_id":"","url":"https://api.github.com/users/Florian-R","html_url":"https://github.com/Florian-R","followers_url":"https://api.github.com/users/Florian-R/followers","following_url":"https://api.github.com/users/Florian-R/following{/other_user}","gists_url":"https://api.github.com/users/Florian-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Florian-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Florian-R/subscriptions","organizations_url":"https://api.github.com/users/Florian-R/orgs","repos_url":"https://api.github.com/users/Florian-R/repos","events_url":"https://api.github.com/users/Florian-R/events{/privacy}","received_events_url":"https://api.github.com/users/Florian-R/received_events","type":"User","site_admin":false},"created_at":"2017-05-31T10:18:22Z","updated_at":"2017-05-31T10:18:22Z","body":"I can confirm this one. If I try to format with the devtools opened, I've got this error : \r\n\r\n```\r\n[Extension Host] prettier-eslint [ERROR]: eslint fix failed due to an eslint error\r\nd.logExtensionHostMessage @ extensionHost.ts:285\r\n(anonymous) @ extensionHost.ts:139\r\nemitTwo @ events.js:106\r\nemit @ events.js:191\r\nprocess.nextTick @ internal/child_process.js:752\r\n_combinedTickCallback @ internal/process/next_tick.js:67\r\n_tickCallback @ internal/process/next_tick.js:98\r\n\r\nPath must be a string. Received undefined\r\ne.doShow @ messageService.ts:125\r\ne.show @ messageService.ts:104\r\n(anonymous) @ mainThreadMessageService.ts:64\r\nn.Class.derive._oncancel @ winjs.base.raw.js:1638\r\nt.showMessage @ mainThreadMessageService.ts:34\r\nt.$showMessage @ mainThreadMessageService.ts:28\r\ne.handle @ abstractThreadService.ts:34\r\ns @ ipcRemoteCom.ts:275\r\nf @ ipcRemoteCom.ts:231\r\n_combinedTickCallback @ internal/process/next_tick.js:67\r\n_tickCallback @ internal/process/next_tick.js:98\r\n```\r\n\r\nAfter some digging, I can see, when logging the error [here](https://github.com/esbenp/prettier-vscode/blob/b3a77759c8c99e5b79d1104e3b2d16f19e6fbb57/src/PrettierEditProvider.ts#L115) that an error is thrown because of some pathname passed by eslint : \r\n\r\n```\r\n[Extension Host] e TypeError: Path must be a string. Received undefined\r\n    at assertPath (path.js:7:11)\r\n    at Object.extname (path.js:887:5)\r\n    at processText (c:\\Users\\florian\\front\\dpi-osiris-angular-ui\\node_modules\\eslint\\lib\\cli-engine.js:193:30)\r\n    at CLIEngine.executeOnText (c:\\Users\\f.revet\\workspace\\dpi-osiris-angular-ui\\node_modules\\eslint\\lib\\cli-engine.js:686:26)\r\n    at eslintFix (C:\\Users\\f.revet\\.vscode\\extensions\\esbenp.prettier-vscode-0.17.1\\node_modules\\prettier-eslint\\dist\\index.js:151:27)\r\n    at format (C:\\Users\\f.revet\\.vscode\\extensions\\esbenp.prettier-vscode-0.17.1\\node_modules\\prettier-eslint\\dist\\index.js:106:10)\r\n    at format (C:\\Users\\f.revet\\.vscode\\extensions\\esbenp.prettier-vscode-0.17.1\\out\\src\\PrettierEditProvider.js:44:16)\r\n    at PrettierEditProvider.provideDocumentFormattingEdits (C:\\Users\\f.revet\\.vscode\\extensions\\esbenp.prettier-vscode-0.17.1\\out\\src\\PrettierEditProvider.js:76:76)\r\n    at c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:308630\r\n    at c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:73481\r\n    at new n.Class.derive._oncancel (c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:69530)\r\n    at Object.f [as asWinJsPromise] (c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:73444)\r\n    at e.provideDocumentFormattingEdits (c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:308584)\r\n    at c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:318379\r\n    at t._withAdapter (c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:314584)\r\n    at t.$provideDocumentFormattingEdits (c:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\node\\extensionHostProcess.js:4:318341)\r\n```\r\n\r\nDidn't go further but I'm pretty sure this error come from the fact that my current project use an old and incompatible version of eslint (1.10.3, the latest in the 1.X branch FWIW) and this extension try to use the local one.\r\n\r\nNot sure about the way to fix that."}}
{"actor":{"display_login":"Florian-R"}}