Skip to content

Commit 82d9188

Browse files
authored
Upgrade prettier to 1.12.1 and run format (#5040)
* Upgrade prettier to 1.12.1 and run format * Update snapshot
1 parent cc43bd1 commit 82d9188

File tree

92 files changed

+1871
-1619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1871
-1619
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Websites built with Gatsby:
198198
([source](https://github.com/HaoZeke/hbtuMun18))
199199
* [The Audacious Project](https://audaciousproject.org/)
200200
* [upGizmo](https://www.upgizmo.com/)
201-
* [The Bastion Bot](https://bastionbot.org/ 'The Bastion Bot')
201+
* [The Bastion Bot](https://bastionbot.org/ "The Bastion Bot")
202202
* [Yuuniworks](https://www.yuuniworks.com/) ([source](https://github.com/junkboy0315/yuuni-web))
203203
* [Chin Loong Tan - Blog/Portfolio](https://chinloongtan.com/)
204204
* [F1 Vision](https://f1vision.com/)

docs/blog/2017-10-16-making-website-building-fun/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ before we get to actually coding the frontend.
227227

228228
For example, how does a single image typically get on a website?
229229

230-
1. A page is designed
231-
2. Specific images are chosen
232-
3. The images are resized (with ideally multiple thumbnails to fit different
233-
devices)
234-
4. And finally, the image(s) are included in the HTML/CSS/JS (or React
235-
component) for the page.
230+
1. A page is designed
231+
2. Specific images are chosen
232+
3. The images are resized (with ideally multiple thumbnails to fit different
233+
devices)
234+
4. And finally, the image(s) are included in the HTML/CSS/JS (or React
235+
component) for the page.
236236

237237
What makes gatsby-image really interesting is it's _seamlessly integrated into
238238
Gatsby's data layer_ which has native image processing capabilities.
@@ -278,10 +278,10 @@ export const query = graphql`
278278
So instead of a long pipeline of tasks to setup optimized images for your site,
279279
the steps now are:
280280

281-
1. Install gatsby-image
282-
2. Decide what size of image you need (125x125 in the example above)
283-
3. Add your query and the gatsby-image component to your page
284-
4. And… that's it!
281+
1. Install gatsby-image
282+
2. Decide what size of image you need (125x125 in the example above)
283+
3. Add your query and the gatsby-image component to your page
284+
4. And… that's it!
285285
286286
Now playing with images is fun! Want to tweak your design? No problem, just
287287
change your query a bit and see how the page updates. By eliminating the

docs/blog/2017-10-17-building-i18n-with-gatsby/index.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -298,22 +298,22 @@ To let it render the content into html, you need to load i18n namespaces (using
298298
```js
299299
// gatsby-ssr.js
300300

301-
import React from 'react'
302-
import { Provider } from 'react-redux'
303-
import { renderToString } from 'react-dom/server'
304-
import i18n from './src/i18n'
301+
import React from "react";
302+
import { Provider } from "react-redux";
303+
import { renderToString } from "react-dom/server";
304+
import i18n from "./src/i18n";
305305

306-
import createStore from './src/state/createStore'
306+
import createStore from "./src/state/createStore";
307307

308308
exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {
309-
i18n.loadNamespaces(['common'], () => {
310-
const store = createStore()
309+
i18n.loadNamespaces(["common"], () => {
310+
const store = createStore();
311311
const ConnectedBody = () => (
312312
<Provider store={store}>{bodyComponent}</Provider>
313-
)
314-
replaceBodyHTMLString(renderToString(<ConnectedBody />))
315-
})
316-
}
313+
);
314+
replaceBodyHTMLString(renderToString(<ConnectedBody />));
315+
});
316+
};
317317
```
318318

319319
### Without redux
@@ -323,17 +323,17 @@ exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {
323323
```js
324324
// gatsby-ssr.js
325325

326-
import React from 'react'
327-
import { renderToString } from 'react-dom/server'
328-
import i18n from './src/i18n'
326+
import React from "react";
327+
import { renderToString } from "react-dom/server";
328+
import i18n from "./src/i18n";
329329

330-
import createStore from './src/state/createStore'
330+
import createStore from "./src/state/createStore";
331331

332332
exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {
333-
i18n.loadNamespaces(['common'], () => {
334-
replaceBodyHTMLString(bodyComponent)
335-
})
336-
}
333+
i18n.loadNamespaces(["common"], () => {
334+
replaceBodyHTMLString(bodyComponent);
335+
});
336+
};
337337
```
338338

339339
> `translate` hoc from react-i18next cause page / component not able to SSR. I make it works by import i18n & use i18n.t

docs/blog/2018-01-22-getting-started-gatsby-and-wordpress/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ While this isn't a tutorial -- more a guided walkthrough of me familiarizing and
136136

137137
##Sidenotes
138138

139-
1. You [don't need to know GraphQL](https://github.com/gatsbyjs/gatsby/issues/1172#issuecomment-308634739) to get started with Gatsby. I didn't. It's been a good introduction.
140-
2. Gatsby makes heavy use of [plugins](/docs/plugins/) — both official and community — for a lot of things, from one that implements [Google Analytics](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics), to one that adds [GitHub's accessibility error scanner](https://github.com/alampros/gatsby-plugin-accessibilityjs) to all pages.
141-
3. Read through some of the source code. I particularly enjoyed reading through [the bootstrap process](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/index.js). (It's beautifully commented).
142-
4. Gatsby.js is a static Progressive Web App (PWA) generator, but to be PWA friendly (at least according to the [Lighthouse PWA audit](https://developers.google.com/web/tools/lighthouse/)), look into two plugins: `gatsby-plugin-manifest` and `gatsby-plugin-offline`.
143-
5. I did end up [deploying with Netlify](/docs/deploy-gatsby/#netlify), and I'm super happy with it. (A [previous post](/blog/2017-12-06-gatsby-plus-contentful-plus-netlify/#solution-netlify--gatsby) discussed Netlify a bit more, if you're interested).
139+
1. You [don't need to know GraphQL](https://github.com/gatsbyjs/gatsby/issues/1172#issuecomment-308634739) to get started with Gatsby. I didn't. It's been a good introduction.
140+
2. Gatsby makes heavy use of [plugins](/docs/plugins/) — both official and community — for a lot of things, from one that implements [Google Analytics](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics), to one that adds [GitHub's accessibility error scanner](https://github.com/alampros/gatsby-plugin-accessibilityjs) to all pages.
141+
3. Read through some of the source code. I particularly enjoyed reading through [the bootstrap process](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/index.js). (It's beautifully commented).
142+
4. Gatsby.js is a static Progressive Web App (PWA) generator, but to be PWA friendly (at least according to the [Lighthouse PWA audit](https://developers.google.com/web/tools/lighthouse/)), look into two plugins: `gatsby-plugin-manifest` and `gatsby-plugin-offline`.
143+
5. I did end up [deploying with Netlify](/docs/deploy-gatsby/#netlify), and I'm super happy with it. (A [previous post](/blog/2017-12-06-gatsby-plus-contentful-plus-netlify/#solution-netlify--gatsby) discussed Netlify a bit more, if you're interested).

docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ This map reflects how it took most people a lot of time browsing through the plu
2323

2424
With the empathy map and the interviews as our guide, we learned that most people want to:
2525

26-
1. Find the best, most recent, and relevant plugin, library, or component for their site.
27-
2. Learn how to build a plugin.
28-
3. Preview plugin functionality before installation.
29-
4. Share plugins with others.
26+
1. Find the best, most recent, and relevant plugin, library, or component for their site.
27+
2. Learn how to build a plugin.
28+
3. Preview plugin functionality before installation.
29+
4. Share plugins with others.
3030

3131
## Learning from other plugin libraries
3232

docs/blog/2018-03-29-migration-from-wordpress-to-gatsby/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Gatsby also works great with images, which are usually a big hit to site's perfo
7676

7777
I think Gatsby is great. I had a lot of fun using it so far and I've learned much in the process. It offers you freedom and flexibility. However, it is not as mature as some of the competitors. This is improving quickly as it is under rapid development. Still, I did encounter some bugs complicating my development. On the other hand, the community was really helpful and supportive. Some of the features, which I would consider standard were not yet available or sufficient such as tags and categories support, pagination or Open Graph metadata. I would also like to see AsciiDoc support instead of just plain Markdown. One of the biggest problems was probably the lack of visual themes. For a long time, there was not any official themes directory. In Feb 2018 [Gatsby Manor was launched](/blog/2018-02-09-announcing-gatsby-manor-themes-for-gatsbyjs/) and now it contains just SIX themes, which are all only ports of [HTML5 UP themes](https://html5up.net/). However, with the current development rate, I am sure more and more plugins will be available out of the box shortly.
7878

79-
## Results
79+
## Results
8080

8181
Overall I am really happy with Gatsby and the migration from WordPress. I no longer fear my WordPress will get compromised. Everything is now on GitHub and under version control. It's much more transparent. No longer need of database backups and rollbacks are now easy in case of something goes wrong. Not to mention the possibility of developing new features safely in branches and deploying and testing them separately from the 'production' environment. And no more fees for hosted WordPress. And writing in markdown is also more convenient for me as I don't focus on HTML or visuals when writing but rather on the content.
8282

docs/blog/2018-04-06-introducing-gatsby-rfc-process/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ author: Kyle Mathews
44
date: "2018-04-06"
55
---
66

7-
We're adopting an RFC ("request for comments") process for contributing ideas to Gatsby.
7+
We're adopting an RFC ("request for comments") process for contributing ideas to Gatsby.
88

99
Inspired by [React](https://github.com/reactjs/rfcs), [Yarn](https://github.com/yarnpkg/rfcs), [Ember](https://github.com/emberjs/rfcs), and [Rust](https://github.com/rust-lang/rfcs), the goal is to allow Gatsby core team members and community members to collaborate on the design of new features. It's also intended to provide a clear path for ideas to enter the project:
1010

11-
- Create an RFC document detailing your proposal.
12-
- Submit a PR to the [RFC repository](https://github.com/gatsbyjs/rfcs).
13-
- Incorporate feedback into the proposal.
14-
- After discussion, the core team may or may not accept the RFC.
15-
- If the RFC is accepted, the PR is merged.
11+
* Create an RFC document detailing your proposal.
12+
* Submit a PR to the [RFC repository](https://github.com/gatsbyjs/rfcs).
13+
* Incorporate feedback into the proposal.
14+
* After discussion, the core team may or may not accept the RFC.
15+
* If the RFC is accepted, the PR is merged.
1616

1717
RFCs are accepted when they are approved for implementation in Gatsby. A more thorough description of the process is available in the repository's [README](https://github.com/gatsbyjs/rfcs/blob/master/README.md). The exact details may be refined in the future.
1818

docs/blog/2018-04-10-how-to-handle-comments-in-gatsby-blogs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: How to handle comments in Gatsby blogs
33
date: "2018-04-09"
44
author: "Gatsby Central"
55
canonicalLink: https://www.gatsbycentral.com/how-to-handle-comments-in-gatsby-blogs
6-
publishedAt: "Gatsby Central"
6+
publishedAt: "Gatsby Central"
77
---
88

99
> tl;dr Hosted services like disqus are the easiest. Staticman is the best option, but requires some setup.

docs/blog/2018-04-11-trying-out-gatsby-at-work-and-co/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Our project was to build a new website for [Whittle School & Studios](https://ww
1919

2020
We had a blast building the site, and learned a lot about Gatsby in the process. This post will take you through the different parts of our journey:
2121

22-
- [Choosing a stack](#choosing-a-stack)
23-
- [Creating a Gatsby workflow](#creating-a-gatsby-workflow)
24-
- [Contributing to Gatsby](#contributing-to-gatsby)
22+
* [Choosing a stack](#choosing-a-stack)
23+
* [Creating a Gatsby workflow](#creating-a-gatsby-workflow)
24+
* [Contributing to Gatsby](#contributing-to-gatsby)
2525

2626
## Choosing a stack
2727

@@ -37,7 +37,7 @@ As a content-heavy site, the project would need a CMS. Our choice here was [Cont
3737

3838
We also knew that the site would eventually need to launch in both the US and China. This came with a bunch of unknowns on the China side of things: Could we rely on the same build system and CDN for all locales, or would China require a unique setup to account for server performance discrepancies and possible API restrictions?
3939

40-
We didn’t know, and we weren’t going to know for some time, because most of these decisions were going to be made by an external vendor. Not wanting to back ourselves into a corner, we decided to use a static site generator. No matter what devops we wound up with, we could bank on compiling static files and putting them *somewhere*.
40+
We didn’t know, and we weren’t going to know for some time, because most of these decisions were going to be made by an external vendor. Not wanting to back ourselves into a corner, we decided to use a static site generator. No matter what devops we wound up with, we could bank on compiling static files and putting them _somewhere_.
4141

4242
All of this begged the question: “What’s a good static site generator that works with Contentful?”
4343

@@ -51,7 +51,7 @@ Gatsby is built on React, something our team already knows and likes. We use Rea
5151

5252
#### Prefetched pages ⚡️
5353

54-
When we decided to use a static site generator, we assumed we’d be building a classic *static site*, with each route change requesting brand new HTML from the server. For a small, simple site, we thought this was good enough, but Gatsby gave us one better: pre-fetching, out of the box. This meant that our site would feel like a single page app while still benefiting from the flexibility and improved performance of a static site.
54+
When we decided to use a static site generator, we assumed we’d be building a classic _static site_, with each route change requesting brand new HTML from the server. For a small, simple site, we thought this was good enough, but Gatsby gave us one better: pre-fetching, out of the box. This meant that our site would feel like a single page app while still benefiting from the flexibility and improved performance of a static site.
5555

5656
#### Contentful support
5757

@@ -261,13 +261,13 @@ If you’re nervous about contributing to a library, do what I did: make a reall
261261

262262
### Reading the documentation
263263

264-
We developers often take pride in how far we’re able to get *without* reading the documentation — at least I know I do — but, as I came to make subsequent PRs to Gatsby, I found the [contributor guidelines](https://github.com/gatsbyjs/gatsby/blob/master/CONTRIBUTING.md) to be incredibly helpful.
264+
We developers often take pride in how far we’re able to get _without_ reading the documentation — at least I know I do — but, as I came to make subsequent PRs to Gatsby, I found the [contributor guidelines](https://github.com/gatsbyjs/gatsby/blob/master/CONTRIBUTING.md) to be incredibly helpful.
265265

266266
In particular, the documentation will show you how to use your local Gatsby clone and [gatsby-dev-cli](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-dev-cli) to:
267267

268-
- Watch for your local changes to Gatsby packages
269-
- Recompile packages on-the-fly
270-
- Copy these packages into your project’s `node_modules` folder to test as you go
268+
* Watch for your local changes to Gatsby packages
269+
* Recompile packages on-the-fly
270+
* Copy these packages into your project’s `node_modules` folder to test as you go
271271

272272
If you’ve ever used `yarn link` to modify a dependency locally, this provides a similar experience.
273273

@@ -287,9 +287,9 @@ Gatsby, however, uses a monorepo architecture, so pushing up a fork with a chang
287287

288288
Our workaround was to create a new repo for the package in question and push the build directly to Github. Here’s how it would work if you were making an update to, say, `gatsby-source-contentful`:
289289

290-
- Go to your local fork of Gatsby, on the branch with your changes, and run `yarn watch` to compile a built version of your modified package.
291-
- Copy that package to a new directory `cp -a packages/gatsby-source-contentful path-to-my-repo`
292-
- Push the contents of this directory to Github and link it in your `package.json` as usual.
290+
* Go to your local fork of Gatsby, on the branch with your changes, and run `yarn watch` to compile a built version of your modified package.
291+
* Copy that package to a new directory `cp -a packages/gatsby-source-contentful path-to-my-repo`
292+
* Push the contents of this directory to Github and link it in your `package.json` as usual.
293293

294294
## Following up
295295

docs/blog/2018-1-18-strapi-and-gatsby/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ Strapi APIs are based on a data structure called Content Types (equivalent of mo
110110

111111
Add some articles in the database. To do so, follow these instructions:
112112

113-
1. Visit the [articles list page](http://localhost:1337/admin/plugins/content-type-builder/models/article).
114-
2. Click on `Add New Article`.
115-
3. Insert values, link to an author and submit the form.
116-
4. Create two other articles.
113+
1. Visit the [articles list page](http://localhost:1337/admin/plugins/content-type-builder/models/article).
114+
2. Click on `Add New Article`.
115+
3. Insert values, link to an author and submit the form.
116+
4. Create two other articles.
117117

118118
![Tutorial](strapi-content-manager.png)
119119

0 commit comments

Comments
 (0)