{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/2722","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/2722/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/2722/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/2722/events","html_url":"https://github.com/prettier/prettier/pull/2722","id":254385802,"number":2722,"title":"feat(resolve-config): add `sync` option","user":{"login":"ikatyang","id":8341033,"avatar_url":"https://avatars1.githubusercontent.com/u/8341033?v=4","gravatar_id":"","url":"https://api.github.com/users/ikatyang","html_url":"https://github.com/ikatyang","followers_url":"https://api.github.com/users/ikatyang/followers","following_url":"https://api.github.com/users/ikatyang/following{/other_user}","gists_url":"https://api.github.com/users/ikatyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ikatyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikatyang/subscriptions","organizations_url":"https://api.github.com/users/ikatyang/orgs","repos_url":"https://api.github.com/users/ikatyang/repos","events_url":"https://api.github.com/users/ikatyang/events{/privacy}","received_events_url":"https://api.github.com/users/ikatyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-31T16:00:05Z","updated_at":"2017-09-01T03:52:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/prettier/prettier/pulls/2722","html_url":"https://github.com/prettier/prettier/pull/2722","diff_url":"https://github.com/prettier/prettier/pull/2722.diff","patch_url":"https://github.com/prettier/prettier/pull/2722.patch"},"body":"I'd like to use `resolveConfig` in [tslint-plugin-prettier](https://github.com/ikatyang/tslint-plugin-prettier) to support config file, but unfortunately tslint did not provide async way to load rules. (There is also a feature request for https://github.com/prettier/eslint-plugin-prettier/issues/46, but I'm not sure if eslint supported async or not.)\r\n\r\nThen I found cosmiconfig itself supports `sync` option so I started to write this PR, but after I wrote this PR, I realized that it just supports `sync` at 3.0 branch (https://github.com/davidtheclark/cosmiconfig/pull/78). 😅"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/326480630","html_url":"https://github.com/prettier/prettier/pull/2722#issuecomment-326480630","issue_url":"https://api.github.com/repos/prettier/prettier/issues/2722","id":326480630,"user":{"login":"ikatyang","id":8341033,"avatar_url":"https://avatars1.githubusercontent.com/u/8341033?v=4","gravatar_id":"","url":"https://api.github.com/users/ikatyang","html_url":"https://github.com/ikatyang","followers_url":"https://api.github.com/users/ikatyang/followers","following_url":"https://api.github.com/users/ikatyang/following{/other_user}","gists_url":"https://api.github.com/users/ikatyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ikatyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikatyang/subscriptions","organizations_url":"https://api.github.com/users/ikatyang/orgs","repos_url":"https://api.github.com/users/ikatyang/repos","events_url":"https://api.github.com/users/ikatyang/events{/privacy}","received_events_url":"https://api.github.com/users/ikatyang/received_events","type":"User","site_admin":false},"created_at":"2017-09-01T03:52:52Z","updated_at":"2017-09-01T03:52:52Z","author_association":"CONTRIBUTOR","body":"My original thought is that I don't want to add a new API, but it seems `resolveConfigSync()` is more intuitive, or something like `resolveConfig.sync()`?"}}
{"actor":{"display_login":"ikatyang"}}