-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update prettier #22520
Update prettier #22520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I have one change request:
Prettier 2.0 had changed default value for arrowParens
option from "avoid" to "always" (link). But we'd prefer to keep the old style for now.
So could you please add arrowParens: "avoid"
to .prettierrc
which matches previous default. This should also reduce the number of affected files in this PR.
52464d4
to
a31c4d7
Compare
Sorry for the delay. I think we can merge this but need to resolve conflicts first and also figure out why the |
769b379
to
381865b
Compare
@vladar I just rebased my branch onto |
Yeah but for some reason |
@vladar I only get warnings when running Will update |
@vladar I've found a linting error, but CI is still failing 😕 |
@vladar I updated all |
@vladar Linting is passing, but still errors on unit tests. |
I think tests are failing because prettier output is captured in snapshots in several plugins. You need to run Also, sadly, there are new conflicts. Looks like we must move fast after changes to be able to merge this 😄 |
@@ -173,7 +173,8 @@ To write a new GraphQL example, a Codesandbox project with a Gatsby site can be | |||
```mdx | |||
Here's an example of a GraphQL query inline: | |||
|
|||
<iframe src="https://711808k40x.sse.codesandbox.io/___graphql?query=query%20TitleQuery%20%7B%0A%20%20site%20%7B%0A%20%20%20%20siteMetadata%20%7B%0A%20%20%20%20%20%20title%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&explorerIsOpen=false&operationName=TitleQuery" /> // highlight-line | |||
<iframe src="https://711808k40x.sse.codesandbox.io/___graphql?query=query%20TitleQuery%20%7B%0A%20%20site%20%7B%0A%20%20%20%20siteMetadata%20%7B%0A%20%20%20%20%20%20title%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&explorerIsOpen=false&operationName=TitleQuery" /> // | |||
highlight-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving highlight-line
to the new line doesn't look right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this got merged with the new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing! Created a PR to address this: #23140
1d40082
to
36baef8
Compare
@vladar I just rebased the branch and tried to run Cannot find module 'gatsby-core-utils' from 'path-serializer.ts' Can't figure out what causes this error tho 😕 |
Maybe try running |
d8f22a7
to
71c8bbb
Compare
packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
This reverts commit 008eb99
packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
Co-Authored-By: Dima An <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, it's green! Sorry for the churn but it's done now! Let's ship it while we can :) Great job! 💜
I'm happy it got green 🙂 |
* Update prettier to latest version * Run 'yarn format' from root of project * Remove prettier-ignore for nested markdown * Fix starters * Fix benchmarks * Fix examples * Fix integration-tests * Update eslint-config-prettier & eslint-plugin-prettier * Fix linting * Update all .prettierrc * Run Prettier on full codebase * Remove unnecessary .prettierrc & .prettierignore files * Update Prettier script * Update snapshots * Revert snapshot * Revert "Update Prettier script" This reverts commit 008eb99 * Update snapshot * Update docs/blog/2018-08-09-swag-store/index.md Co-Authored-By: Dima An <[email protected]> Co-authored-by: Dima An <[email protected]>
* Update prettier to latest version * Run 'yarn format' from root of project * Remove prettier-ignore for nested markdown * Fix starters * Fix benchmarks * Fix examples * Fix integration-tests * Update eslint-config-prettier & eslint-plugin-prettier * Fix linting * Update all .prettierrc * Run Prettier on full codebase * Remove unnecessary .prettierrc & .prettierignore files * Update Prettier script * Update snapshots * Revert snapshot * Revert "Update Prettier script" This reverts commit 008eb99 * Update snapshot * Update docs/blog/2018-08-09-swag-store/index.md Co-Authored-By: Dima An <[email protected]> Co-authored-by: Dima An <[email protected]>
yarn format
from root of projectCloses #22506