{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier-vscode/issues/232","repository_url":"https://api.github.com/repos/prettier/prettier-vscode","labels_url":"https://api.github.com/repos/prettier/prettier-vscode/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier-vscode/issues/232/comments","events_url":"https://api.github.com/repos/prettier/prettier-vscode/issues/232/events","html_url":"https://github.com/prettier/prettier-vscode/issues/232","id":262164275,"number":232,"title":"Custom Prettier Resolution","user":{"login":"bradenhs","id":22484684,"avatar_url":"https://avatars1.githubusercontent.com/u/22484684?v=4","gravatar_id":"","url":"https://api.github.com/users/bradenhs","html_url":"https://github.com/bradenhs","followers_url":"https://api.github.com/users/bradenhs/followers","following_url":"https://api.github.com/users/bradenhs/following{/other_user}","gists_url":"https://api.github.com/users/bradenhs/gists{/gist_id}","starred_url":"https://api.github.com/users/bradenhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradenhs/subscriptions","organizations_url":"https://api.github.com/users/bradenhs/orgs","repos_url":"https://api.github.com/users/bradenhs/repos","events_url":"https://api.github.com/users/bradenhs/events{/privacy}","received_events_url":"https://api.github.com/users/bradenhs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-02T17:37:36Z","updated_at":"2017-10-03T06:08:54Z","closed_at":null,"author_association":"NONE","body":"Instead of needing to have prettier installed in your current folder's `node_modules` directory it'd be nice to have the option to specify where you'd like the extension to look for your prettier installation. Resolution strategy would be as follows:\r\n\r\n1. If \"prettier.path\" is defined try to use that.\r\n2. See if there's a copy in the current directory's node_modules folder.\r\n3. Use a copy of prettier bundled with the installation.\r\n\r\nThe issue I ran into: I'm using yarn workspaces and it hoists dependencies if they're shared between different workspaces. Because of this my prettier installation isn't in the individual workspace's node_modules folder. It'd be nice to have the ability to set the following in my `.vscode/settings.json` file:\r\n\r\n```\r\n\"prettier.path\": \"../../node_modules/prettier\"\r\n```\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/prettier/prettier-vscode/issues/comments/333748871","html_url":"https://github.com/prettier/prettier-vscode/issues/232#issuecomment-333748871","issue_url":"https://api.github.com/repos/prettier/prettier-vscode/issues/232","id":333748871,"user":{"login":"CiGit","id":1453420,"avatar_url":"https://avatars1.githubusercontent.com/u/1453420?v=4","gravatar_id":"","url":"https://api.github.com/users/CiGit","html_url":"https://github.com/CiGit","followers_url":"https://api.github.com/users/CiGit/followers","following_url":"https://api.github.com/users/CiGit/following{/other_user}","gists_url":"https://api.github.com/users/CiGit/gists{/gist_id}","starred_url":"https://api.github.com/users/CiGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CiGit/subscriptions","organizations_url":"https://api.github.com/users/CiGit/orgs","repos_url":"https://api.github.com/users/CiGit/repos","events_url":"https://api.github.com/users/CiGit/events{/privacy}","received_events_url":"https://api.github.com/users/CiGit/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T06:08:54Z","updated_at":"2017-10-03T06:08:54Z","author_association":"COLLABORATOR","body":"If I understood correctly your file system looks like\r\n\r\n- node_modules/prettier\r\n- sub/project/package.json{\"prettier\"}\r\n\r\nI think we can update our local resolution algorithm to resolve this case. Resolve from package.json's folder.\r\n\r\n:heavy_plus_sign: No new settings (and we wouldn't have to do that for other modules we have)\r\n\r\n:heavy_minus_sign:  Still won't resolve a randomly installed prettier (global install, ...)\r\n"}}
{"actor":{"display_login":"CiGit"}}