{"action":"closed","number":3968,"pull_request":{"url":"https://api.github.com/repos/facebook/create-react-app/pulls/3968","id":166987432,"node_id":"MDExOlB1bGxSZXF1ZXN0MTY2OTg3NDMy","html_url":"https://github.com/facebook/create-react-app/pull/3968","diff_url":"https://github.com/facebook/create-react-app/pull/3968.diff","patch_url":"https://github.com/facebook/create-react-app/pull/3968.patch","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/3968","number":3968,"state":"closed","locked":false,"title":"Use package.json \"prettier\" key in the \"Formatting Code Automatically\" section","user":{"login":"dmfrancisco","id":212106,"node_id":"MDQ6VXNlcjIxMjEwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/212106?v=4","gravatar_id":"","url":"https://api.github.com/users/dmfrancisco","html_url":"https://github.com/dmfrancisco","followers_url":"https://api.github.com/users/dmfrancisco/followers","following_url":"https://api.github.com/users/dmfrancisco/following{/other_user}","gists_url":"https://api.github.com/users/dmfrancisco/gists{/gist_id}","starred_url":"https://api.github.com/users/dmfrancisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmfrancisco/subscriptions","organizations_url":"https://api.github.com/users/dmfrancisco/orgs","repos_url":"https://api.github.com/users/dmfrancisco/repos","events_url":"https://api.github.com/users/dmfrancisco/events{/privacy}","received_events_url":"https://api.github.com/users/dmfrancisco/received_events","type":"User","site_admin":false},"body":"Using Prettier in the code editor is very useful and it's even incentivized in the last sentence of the \"Formatting Code Automatically\" section of the User Guide. Users can also have a custom Prettier configuration in their `package.json`, which is automatically used by code editor extensions and the Prettier CLI.\r\n\r\nHowever, the instructions in this section pass a `--single-quote` option to the CLI which will override the user's custom config (if existent). This means the code automatically formatted by their editors may be different to what will end up being committed.\r\n\r\nIdeally, it would be great if we could simplify and remove the custom `--single-quote` config, but I guess this was added to match the styling of the generated files (such as `serviceWorker.js`).\r\n\r\nIn this PR I moved the configuration to the `\"prettier\"` key in the `package.json` so that is used by both the CLI and code editor extensions.\r\n\r\nI also added a sentence explaining what the key is about so it's harder to miss (because some users may be using a `prettier.config.js` or `.prettierrc` file instead and will want to adjust).\r\n\r\nFeel free to close if you disagree! Thank you for creating this project and documenting it so well 👏 \r\n\r\n_The reason for this is that I use Prettier in VS Code and have recently blindly copied these instructions, and got confused when I started seeing single quotes instead of double quotes in my committed files, despite having my custom config._ 😄 ","created_at":"2018-02-04T00:17:08Z","updated_at":"2018-11-01T16:14:01Z","closed_at":"2018-11-01T16:14:01Z","merged_at":null,"merge_commit_sha":"250489328763ab3f97382c52f41590591a4b1880","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":409579052,"node_id":"MDU6TGFiZWw0MDk1NzkwNTI=","url":"https://api.github.com/repos/facebook/create-react-app/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/create-react-app/pulls/3968/commits","review_comments_url":"https://api.github.com/repos/facebook/create-react-app/pulls/3968/comments","review_comment_url":"https://api.github.com/repos/facebook/create-react-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/3968/comments","statuses_url":"https://api.github.com/repos/facebook/create-react-app/statuses/b9a037c088597cb03500c70c7b586dff0a2f4697","head":{"label":"dmfrancisco:next","ref":"next","sha":"b9a037c088597cb03500c70c7b586dff0a2f4697","user":{"login":"dmfrancisco","id":212106,"node_id":"MDQ6VXNlcjIxMjEwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/212106?v=4","gravatar_id":"","url":"https://api.github.com/users/dmfrancisco","html_url":"https://github.com/dmfrancisco","followers_url":"https://api.github.com/users/dmfrancisco/followers","following_url":"https://api.github.com/users/dmfrancisco/following{/other_user}","gists_url":"https://api.github.com/users/dmfrancisco/gists{/gist_id}","starred_url":"https://api.github.com/users/dmfrancisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmfrancisco/subscriptions","organizations_url":"https://api.github.com/users/dmfrancisco/orgs","repos_url":"https://api.github.com/users/dmfrancisco/repos","events_url":"https://api.github.com/users/dmfrancisco/events{/privacy}","received_events_url":"https://api.github.com/users/dmfrancisco/received_events","type":"User","site_admin":false},"repo":{"id":120138941,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAxMzg5NDE=","name":"create-react-app","full_name":"dmfrancisco/create-react-app","private":false,"owner":{"login":"dmfrancisco","id":212106,"node_id":"MDQ6VXNlcjIxMjEwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/212106?v=4","gravatar_id":"","url":"https://api.github.com/users/dmfrancisco","html_url":"https://github.com/dmfrancisco","followers_url":"https://api.github.com/users/dmfrancisco/followers","following_url":"https://api.github.com/users/dmfrancisco/following{/other_user}","gists_url":"https://api.github.com/users/dmfrancisco/gists{/gist_id}","starred_url":"https://api.github.com/users/dmfrancisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmfrancisco/subscriptions","organizations_url":"https://api.github.com/users/dmfrancisco/orgs","repos_url":"https://api.github.com/users/dmfrancisco/repos","events_url":"https://api.github.com/users/dmfrancisco/events{/privacy}","received_events_url":"https://api.github.com/users/dmfrancisco/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dmfrancisco/create-react-app","description":"Create React apps with no build configuration.","fork":true,"url":"https://api.github.com/repos/dmfrancisco/create-react-app","forks_url":"https://api.github.com/repos/dmfrancisco/create-react-app/forks","keys_url":"https://api.github.com/repos/dmfrancisco/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmfrancisco/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmfrancisco/create-react-app/teams","hooks_url":"https://api.github.com/repos/dmfrancisco/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/dmfrancisco/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/dmfrancisco/create-react-app/events","assignees_url":"https://api.github.com/repos/dmfrancisco/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/dmfrancisco/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/dmfrancisco/create-react-app/tags","blobs_url":"https://api.github.com/repos/dmfrancisco/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmfrancisco/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmfrancisco/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmfrancisco/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmfrancisco/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/dmfrancisco/create-react-app/languages","stargazers_url":"https://api.github.com/repos/dmfrancisco/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/dmfrancisco/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/dmfrancisco/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/dmfrancisco/create-react-app/subscription","commits_url":"https://api.github.com/repos/dmfrancisco/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmfrancisco/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmfrancisco/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmfrancisco/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmfrancisco/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/dmfrancisco/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmfrancisco/create-react-app/merges","archive_url":"https://api.github.com/repos/dmfrancisco/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmfrancisco/create-react-app/downloads","issues_url":"https://api.github.com/repos/dmfrancisco/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/dmfrancisco/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/dmfrancisco/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/dmfrancisco/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmfrancisco/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/dmfrancisco/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/dmfrancisco/create-react-app/deployments","created_at":"2018-02-03T23:28:07Z","updated_at":"2018-02-03T23:28:12Z","pushed_at":"2018-02-03T23:43:52Z","git_url":"git://github.com/dmfrancisco/create-react-app.git","ssh_url":"git@github.com:dmfrancisco/create-react-app.git","clone_url":"https://github.com/dmfrancisco/create-react-app.git","svn_url":"https://github.com/dmfrancisco/create-react-app","homepage":null,"size":5024,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"next"}},"base":{"label":"facebook:next","ref":"next","sha":"79485d7d9ce9fe63d9203c02b663b82fdecf7ac5","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":63537249,"node_id":"MDEwOlJlcG9zaXRvcnk2MzUzNzI0OQ==","name":"create-react-app","full_name":"facebook/create-react-app","private":false,"owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/facebook/create-react-app","description":"Set up a modern web app by running one command.","fork":false,"url":"https://api.github.com/repos/facebook/create-react-app","forks_url":"https://api.github.com/repos/facebook/create-react-app/forks","keys_url":"https://api.github.com/repos/facebook/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/create-react-app/teams","hooks_url":"https://api.github.com/repos/facebook/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/facebook/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/create-react-app/events","assignees_url":"https://api.github.com/repos/facebook/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/create-react-app/tags","blobs_url":"https://api.github.com/repos/facebook/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/create-react-app/languages","stargazers_url":"https://api.github.com/repos/facebook/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/facebook/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/facebook/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/facebook/create-react-app/subscription","commits_url":"https://api.github.com/repos/facebook/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/create-react-app/merges","archive_url":"https://api.github.com/repos/facebook/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/create-react-app/downloads","issues_url":"https://api.github.com/repos/facebook/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/facebook/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/create-react-app/deployments","created_at":"2016-07-17T14:55:11Z","updated_at":"2018-11-01T16:10:43Z","pushed_at":"2018-11-01T16:13:41Z","git_url":"git://github.com/facebook/create-react-app.git","ssh_url":"git@github.com:facebook/create-react-app.git","clone_url":"https://github.com/facebook/create-react-app.git","svn_url":"https://github.com/facebook/create-react-app","homepage":"https://facebook.github.io/create-react-app/","size":8125,"stargazers_count":58530,"watchers_count":58530,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":12573,"mirror_url":null,"archived":false,"open_issues_count":472,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":12573,"open_issues":472,"watchers":58530,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/3968"},"html":{"href":"https://github.com/facebook/create-react-app/pull/3968"},"issue":{"href":"https://api.github.com/repos/facebook/create-react-app/issues/3968"},"comments":{"href":"https://api.github.com/repos/facebook/create-react-app/issues/3968/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/3968/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/3968/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/create-react-app/statuses/b9a037c088597cb03500c70c7b586dff0a2f4697"}},"author_association":"NONE","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":7,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"gaearon"}}