{"action":"created","comment":{"url":"https://api.github.com/repos/prettier/prettier/pulls/comments/191072558","pull_request_review_id":123579737,"id":191072558,"diff_hunk":"@@ -0,0 +1,948 @@\n+---\n+author: Lucas Duailibe (@duailibe)\n+authorURL: https://twitter.com/duailibe\n+title: \"Prettier 1.13: Conquering the web!\"\n+---\n+\n+This releases adds a new  support for several new features and first-class support for working on the browser.\n+\n+<!--truncate-->\n+\n+## Highlights\n+\n+### API/CLI\n+\n+#### Prettier works in the browser!\n+\n+This has been long wanted by the team and our users and we're finally announcing Prettier 1.13 has first-class support for running in the browser. In the past it required several hacks, but as of today you can just load the core bundle and the parsers you want to use.\n+\n+<!-- prettier-ignore -->\n+```html\n+<script src=\"https://unpkg.me/prettier@1.13.0/standalone.js\"></script>\n+<script src=\"https://unpkg.me/prettier@1.13.0/parser-babylon.js\"></script>\n+<script src=\"https://unpkg.me/prettier@1.13.0/parser-graphql.js\"></script>\n+<script type=\"text/javascript\">\n+  $(\"#format\").onClick(function() {\n+    var input = $(\"#input\").val();\n+    $(\"#input\").val(prettier.format(input, { parser: \"babylon\", plugins: prettierPlugins }));\n+  });\n+</script>\n+```\n+\n+Read more about it in the [docs](browser.md).\n+\n+#### Don't default to the JavaScript parser ([#4528] by [@duailibe])\n+\n+In Prettier 1.12 and earlier, when running Prettier on a file without a file extension, Prettier would assume the file contained JavaScript. This lead to a couple of confusing bugs, namely:\n+\n+* If you ran prettier on your `.git` directory, it would reformat files and break your git repo.\n+* If you tried to run prettier on html files, it would sometimes throw an error, but other times parse the HTML as JSX, and format it as if it was JSX (which was often unsafe).\n+\n+In Prettier 1.13, we are changing this behavior. If Prettier cannot determine what language a file is from its extension, and the user has not manually specified a parser to use, Prettier will skip the file.\n+\n+If you need to format files with unsupported or nonstandard extensions, you can use the `--parser` option to specify which parser to use. If you are piping file contents into `stdin`, make sure to include `--stdin-filepath` so that prettier can use the file extension to detect what language to parse the input as.\n+\n+When using the JavaScript API, `prettier.format` and `prettier.formatWithCursor` will now throw an error if you do not include either `parser` or `filepath` in the options you pass in. It will also throw an error if you include `filepath` but not `parser` and the correct parser cannot be inferred from the file path.\n+\n+#### `prettier.getFileInfo()` method and `--file-info` CLI option ([#4341] by [@kachkaev])\n+\n+When invoking Prettier from the API, there was no way to find out if a file should be ignored or not (for `.prettierignore`) so editor integration plugins would have to implement this logic. Also, there was no way to find out if a file was supported by Prettier, so users would need to call Prettier anyway. In 1.13 there's a way to check if a parser will be inferred (and which one) and if the file is ignored or not before actually calling `format`.\n+\n+You can read more about this in the [docs](api.md#prettiergetfileinfofilepath-options).","path":"website/blog/2018-05-23-1.13.0.md","position":51,"original_position":51,"commit_id":"c2376cf55d120835fa074405d810d9a1a88d136e","original_commit_id":"c2376cf55d120835fa074405d810d9a1a88d136e","user":{"login":"j-f1","id":25517624,"avatar_url":"https://avatars2.githubusercontent.com/u/25517624?v=4","gravatar_id":"","url":"https://api.github.com/users/j-f1","html_url":"https://github.com/j-f1","followers_url":"https://api.github.com/users/j-f1/followers","following_url":"https://api.github.com/users/j-f1/following{/other_user}","gists_url":"https://api.github.com/users/j-f1/gists{/gist_id}","starred_url":"https://api.github.com/users/j-f1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-f1/subscriptions","organizations_url":"https://api.github.com/users/j-f1/orgs","repos_url":"https://api.github.com/users/j-f1/repos","events_url":"https://api.github.com/users/j-f1/events{/privacy}","received_events_url":"https://api.github.com/users/j-f1/received_events","type":"User","site_admin":false},"body":"This link is broken :(","created_at":"2018-05-27T10:51:57Z","updated_at":"2018-05-27T10:51:57Z","html_url":"https://github.com/prettier/prettier/pull/4530#discussion_r191072558","pull_request_url":"https://api.github.com/repos/prettier/prettier/pulls/4530","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/prettier/prettier/pulls/comments/191072558"},"html":{"href":"https://github.com/prettier/prettier/pull/4530#discussion_r191072558"},"pull_request":{"href":"https://api.github.com/repos/prettier/prettier/pulls/4530"}}},"pull_request":{"url":"https://api.github.com/repos/prettier/prettier/pulls/4530","id":190126710,"html_url":"https://github.com/prettier/prettier/pull/4530","diff_url":"https://github.com/prettier/prettier/pull/4530.diff","patch_url":"https://github.com/prettier/prettier/pull/4530.patch","issue_url":"https://api.github.com/repos/prettier/prettier/issues/4530","number":4530,"state":"open","locked":false,"title":"1.13 blog post","user":{"login":"duailibe","id":1574588,"avatar_url":"https://avatars3.githubusercontent.com/u/1574588?v=4","gravatar_id":"","url":"https://api.github.com/users/duailibe","html_url":"https://github.com/duailibe","followers_url":"https://api.github.com/users/duailibe/followers","following_url":"https://api.github.com/users/duailibe/following{/other_user}","gists_url":"https://api.github.com/users/duailibe/gists{/gist_id}","starred_url":"https://api.github.com/users/duailibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duailibe/subscriptions","organizations_url":"https://api.github.com/users/duailibe/orgs","repos_url":"https://api.github.com/users/duailibe/repos","events_url":"https://api.github.com/users/duailibe/events{/privacy}","received_events_url":"https://api.github.com/users/duailibe/received_events","type":"User","site_admin":false},"body":"I started the 1.13 release blog post. I couldn't finish them yet, gonna put up here if anyone else wants to help. Specially with prose, since I'm not a native English speaker.","created_at":"2018-05-23T22:52:21Z","updated_at":"2018-05-27T10:51:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1fa6e23f8cb343c6861205b7c025c4b1e4d99e2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prettier/prettier/pulls/4530/commits","review_comments_url":"https://api.github.com/repos/prettier/prettier/pulls/4530/comments","review_comment_url":"https://api.github.com/repos/prettier/prettier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/4530/comments","statuses_url":"https://api.github.com/repos/prettier/prettier/statuses/c2376cf55d120835fa074405d810d9a1a88d136e","head":{"label":"duailibe:release-1.13","ref":"release-1.13","sha":"c2376cf55d120835fa074405d810d9a1a88d136e","user":{"login":"duailibe","id":1574588,"avatar_url":"https://avatars3.githubusercontent.com/u/1574588?v=4","gravatar_id":"","url":"https://api.github.com/users/duailibe","html_url":"https://github.com/duailibe","followers_url":"https://api.github.com/users/duailibe/followers","following_url":"https://api.github.com/users/duailibe/following{/other_user}","gists_url":"https://api.github.com/users/duailibe/gists{/gist_id}","starred_url":"https://api.github.com/users/duailibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duailibe/subscriptions","organizations_url":"https://api.github.com/users/duailibe/orgs","repos_url":"https://api.github.com/users/duailibe/repos","events_url":"https://api.github.com/users/duailibe/events{/privacy}","received_events_url":"https://api.github.com/users/duailibe/received_events","type":"User","site_admin":false},"repo":{"id":87350221,"name":"prettier","full_name":"duailibe/prettier","owner":{"login":"duailibe","id":1574588,"avatar_url":"https://avatars3.githubusercontent.com/u/1574588?v=4","gravatar_id":"","url":"https://api.github.com/users/duailibe","html_url":"https://github.com/duailibe","followers_url":"https://api.github.com/users/duailibe/followers","following_url":"https://api.github.com/users/duailibe/following{/other_user}","gists_url":"https://api.github.com/users/duailibe/gists{/gist_id}","starred_url":"https://api.github.com/users/duailibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duailibe/subscriptions","organizations_url":"https://api.github.com/users/duailibe/orgs","repos_url":"https://api.github.com/users/duailibe/repos","events_url":"https://api.github.com/users/duailibe/events{/privacy}","received_events_url":"https://api.github.com/users/duailibe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/duailibe/prettier","description":"Prettier is an opinionated JavaScript formatter.","fork":true,"url":"https://api.github.com/repos/duailibe/prettier","forks_url":"https://api.github.com/repos/duailibe/prettier/forks","keys_url":"https://api.github.com/repos/duailibe/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duailibe/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duailibe/prettier/teams","hooks_url":"https://api.github.com/repos/duailibe/prettier/hooks","issue_events_url":"https://api.github.com/repos/duailibe/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/duailibe/prettier/events","assignees_url":"https://api.github.com/repos/duailibe/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/duailibe/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/duailibe/prettier/tags","blobs_url":"https://api.github.com/repos/duailibe/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duailibe/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duailibe/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/duailibe/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duailibe/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/duailibe/prettier/languages","stargazers_url":"https://api.github.com/repos/duailibe/prettier/stargazers","contributors_url":"https://api.github.com/repos/duailibe/prettier/contributors","subscribers_url":"https://api.github.com/repos/duailibe/prettier/subscribers","subscription_url":"https://api.github.com/repos/duailibe/prettier/subscription","commits_url":"https://api.github.com/repos/duailibe/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/duailibe/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/duailibe/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/duailibe/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/duailibe/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/duailibe/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duailibe/prettier/merges","archive_url":"https://api.github.com/repos/duailibe/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duailibe/prettier/downloads","issues_url":"https://api.github.com/repos/duailibe/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/duailibe/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/duailibe/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/duailibe/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duailibe/prettier/labels{/name}","releases_url":"https://api.github.com/repos/duailibe/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/duailibe/prettier/deployments","created_at":"2017-04-05T19:48:31Z","updated_at":"2018-05-26T23:50:05Z","pushed_at":"2018-05-26T23:59:50Z","git_url":"git://github.com/duailibe/prettier.git","ssh_url":"git@github.com:duailibe/prettier.git","clone_url":"https://github.com/duailibe/prettier.git","svn_url":"https://github.com/duailibe/prettier","homepage":"https://prettier.github.io/prettier/","size":22334,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prettier:master","ref":"master","sha":"fda7bf59f482c83a9db94bdc1111689a3e4ff474","user":{"login":"prettier","id":25822731,"avatar_url":"https://avatars2.githubusercontent.com/u/25822731?v=4","gravatar_id":"","url":"https://api.github.com/users/prettier","html_url":"https://github.com/prettier","followers_url":"https://api.github.com/users/prettier/followers","following_url":"https://api.github.com/users/prettier/following{/other_user}","gists_url":"https://api.github.com/users/prettier/gists{/gist_id}","starred_url":"https://api.github.com/users/prettier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettier/subscriptions","organizations_url":"https://api.github.com/users/prettier/orgs","repos_url":"https://api.github.com/users/prettier/repos","events_url":"https://api.github.com/users/prettier/events{/privacy}","received_events_url":"https://api.github.com/users/prettier/received_events","type":"Organization","site_admin":false},"repo":{"id":75104123,"name":"prettier","full_name":"prettier/prettier","owner":{"login":"prettier","id":25822731,"avatar_url":"https://avatars2.githubusercontent.com/u/25822731?v=4","gravatar_id":"","url":"https://api.github.com/users/prettier","html_url":"https://github.com/prettier","followers_url":"https://api.github.com/users/prettier/followers","following_url":"https://api.github.com/users/prettier/following{/other_user}","gists_url":"https://api.github.com/users/prettier/gists{/gist_id}","starred_url":"https://api.github.com/users/prettier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettier/subscriptions","organizations_url":"https://api.github.com/users/prettier/orgs","repos_url":"https://api.github.com/users/prettier/repos","events_url":"https://api.github.com/users/prettier/events{/privacy}","received_events_url":"https://api.github.com/users/prettier/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prettier/prettier","description":"Prettier is an opinionated code formatter.","fork":false,"url":"https://api.github.com/repos/prettier/prettier","forks_url":"https://api.github.com/repos/prettier/prettier/forks","keys_url":"https://api.github.com/repos/prettier/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prettier/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prettier/prettier/teams","hooks_url":"https://api.github.com/repos/prettier/prettier/hooks","issue_events_url":"https://api.github.com/repos/prettier/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/prettier/prettier/events","assignees_url":"https://api.github.com/repos/prettier/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/prettier/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/prettier/prettier/tags","blobs_url":"https://api.github.com/repos/prettier/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prettier/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prettier/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/prettier/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prettier/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/prettier/prettier/languages","stargazers_url":"https://api.github.com/repos/prettier/prettier/stargazers","contributors_url":"https://api.github.com/repos/prettier/prettier/contributors","subscribers_url":"https://api.github.com/repos/prettier/prettier/subscribers","subscription_url":"https://api.github.com/repos/prettier/prettier/subscription","commits_url":"https://api.github.com/repos/prettier/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/prettier/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/prettier/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/prettier/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/prettier/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/prettier/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prettier/prettier/merges","archive_url":"https://api.github.com/repos/prettier/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prettier/prettier/downloads","issues_url":"https://api.github.com/repos/prettier/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/prettier/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/prettier/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/prettier/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prettier/prettier/labels{/name}","releases_url":"https://api.github.com/repos/prettier/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/prettier/prettier/deployments","created_at":"2016-11-29T17:13:37Z","updated_at":"2018-05-27T09:56:18Z","pushed_at":"2018-05-27T06:11:53Z","git_url":"git://github.com/prettier/prettier.git","ssh_url":"git@github.com:prettier/prettier.git","clone_url":"https://github.com/prettier/prettier.git","svn_url":"https://github.com/prettier/prettier","homepage":"https://prettier.io","size":22543,"stargazers_count":24741,"watchers_count":24741,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1143,"mirror_url":null,"archived":false,"open_issues_count":326,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1143,"open_issues":326,"watchers":24741,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prettier/prettier/pulls/4530"},"html":{"href":"https://github.com/prettier/prettier/pull/4530"},"issue":{"href":"https://api.github.com/repos/prettier/prettier/issues/4530"},"comments":{"href":"https://api.github.com/repos/prettier/prettier/issues/4530/comments"},"review_comments":{"href":"https://api.github.com/repos/prettier/prettier/pulls/4530/comments"},"review_comment":{"href":"https://api.github.com/repos/prettier/prettier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prettier/prettier/pulls/4530/commits"},"statuses":{"href":"https://api.github.com/repos/prettier/prettier/statuses/c2376cf55d120835fa074405d810d9a1a88d136e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"j-f1"}}