{"action":"created","issue":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/1614","repository_url":"https://api.github.com/repos/kriasoft/react-starter-kit","labels_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/1614/labels{/name}","comments_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/1614/comments","events_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/1614/events","html_url":"https://github.com/kriasoft/react-starter-kit/pull/1614","id":322619762,"number":1614,"title":"Let Yarn handle package.json formatting, not lint-staged","user":{"login":"josephfrazier","id":6473925,"avatar_url":"https://avatars0.githubusercontent.com/u/6473925?v=4","gravatar_id":"","url":"https://api.github.com/users/josephfrazier","html_url":"https://github.com/josephfrazier","followers_url":"https://api.github.com/users/josephfrazier/followers","following_url":"https://api.github.com/users/josephfrazier/following{/other_user}","gists_url":"https://api.github.com/users/josephfrazier/gists{/gist_id}","starred_url":"https://api.github.com/users/josephfrazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephfrazier/subscriptions","organizations_url":"https://api.github.com/users/josephfrazier/orgs","repos_url":"https://api.github.com/users/josephfrazier/repos","events_url":"https://api.github.com/users/josephfrazier/events{/privacy}","received_events_url":"https://api.github.com/users/josephfrazier/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-13T19:18:23Z","updated_at":"2018-05-14T20:32:42Z","closed_at":"2018-05-14T07:09:36Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/pulls/1614","html_url":"https://github.com/kriasoft/react-starter-kit/pull/1614","diff_url":"https://github.com/kriasoft/react-starter-kit/pull/1614.diff","patch_url":"https://github.com/kriasoft/react-starter-kit/pull/1614.patch"},"body":"When installing/removing packages, Yarn formats `package.json`, which\r\ncauses it to show up in the `git diff` as shown here:\r\n\r\n<details><summary>git diff</summary>\r\n\r\n```diff\r\ndiff --git a/package.json b/package.json\r\nindex 8efeb43..7db2342 100644\r\n--- a/package.json\r\n+++ b/package.json\r\n@@ -6,7 +6,12 @@\r\n     \"node\": \">=6.13.1\",\r\n     \"npm\": \">=3.10.10\"\r\n   },\r\n-  \"browserslist\": [\">1%\", \"last 4 versions\", \"Firefox ESR\", \"not ie < 9\"],\r\n+  \"browserslist\": [\r\n+    \">1%\",\r\n+    \"last 4 versions\",\r\n+    \"Firefox ESR\",\r\n+    \"not ie < 9\"\r\n+  ],\r\n   \"dependencies\": {\r\n     \"@babel/polyfill\": \"^7.0.0-beta.44\",\r\n     \"bluebird\": \"^3.5.1\",\r\n@@ -116,9 +121,18 @@\r\n     \"webpack-node-externals\": \"^1.7.2\"\r\n   },\r\n   \"lint-staged\": {\r\n-    \"*.{js,jsx}\": [\"eslint --no-ignore --fix\", \"git add --force\"],\r\n-    \"*.{json,md,graphql}\": [\"prettier --write\", \"git add --force\"],\r\n-    \"*.{css,less,styl,scss,sass,sss}\": [\"stylelint --fix\", \"git add --force\"]\r\n+    \"*.{js,jsx}\": [\r\n+      \"eslint --no-ignore --fix\",\r\n+      \"git add --force\"\r\n+    ],\r\n+    \"*.{json,md,graphql}\": [\r\n+      \"prettier --write\",\r\n+      \"git add --force\"\r\n+    ],\r\n+    \"*.{css,less,styl,scss,sass,sss}\": [\r\n+      \"stylelint --fix\",\r\n+      \"git add --force\"\r\n+    ]\r\n   },\r\n   \"scripts\": {\r\n     \"precommit\": \"lint-staged\",\r\n```\r\n\r\n</details>\r\n\r\nThis change simply makes `lint-staged` ignore `package.json`, so that it\r\ndoesn't conflict with Yarn's formatting. See https://github.com/okonet/lint-staged/tree/1601c026abb283fc71791cf91980485d1ca8d085#advanced-config-format"},"comment":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/comments/388953129","html_url":"https://github.com/kriasoft/react-starter-kit/pull/1614#issuecomment-388953129","issue_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/1614","id":388953129,"user":{"login":"josephfrazier","id":6473925,"avatar_url":"https://avatars0.githubusercontent.com/u/6473925?v=4","gravatar_id":"","url":"https://api.github.com/users/josephfrazier","html_url":"https://github.com/josephfrazier","followers_url":"https://api.github.com/users/josephfrazier/followers","following_url":"https://api.github.com/users/josephfrazier/following{/other_user}","gists_url":"https://api.github.com/users/josephfrazier/gists{/gist_id}","starred_url":"https://api.github.com/users/josephfrazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephfrazier/subscriptions","organizations_url":"https://api.github.com/users/josephfrazier/orgs","repos_url":"https://api.github.com/users/josephfrazier/repos","events_url":"https://api.github.com/users/josephfrazier/events{/privacy}","received_events_url":"https://api.github.com/users/josephfrazier/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T20:32:42Z","updated_at":"2018-05-14T20:32:42Z","author_association":"CONTRIBUTOR","body":"Thanks for the quick merge!"}}
{"actor":{"display_login":"josephfrazier"}}