Skip to content

Commit dcfa0fa

Browse files
authored
Upgrade to Prettier 1.9.1 (gatsbyjs#3146)
* Upgrade to Prettier 1.9.1 * Switch to formatting markdown with semis so weirdly put semis at front of fragments
1 parent 38a865f commit dcfa0fa

File tree

119 files changed

+668
-749
lines changed

Some content is hidden

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

119 files changed

+668
-749
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ export const pageQuery = `
529529
}
530530
}
531531
}
532-
`
532+
`;
533533
```
534534

535535
You must now write:
@@ -545,7 +545,7 @@ export const pageQuery = graphql`
545545
}
546546
}
547547
}
548-
`
548+
`;
549549
```
550550

551551
## [1.0.0-alpha10] - 2016-11-17

CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ The usual contributing steps are:
3333
* Run `npm run watch` from the root of the repo to first do an initial Babel
3434
build of all packages and then watch for changes to packages' source code and
3535
compile these changes on-the-fly as you work.
36-
* Install [gatsby-dev-cli](/packages/gatsby-dev-cli/) globally: `yarn global add
37-
gatsby-dev-cli`
36+
* Install [gatsby-dev-cli](/packages/gatsby-dev-cli/) globally: `yarn global add gatsby-dev-cli`
3837
* For each of your Gatsby test sites, run the `gatsby-dev` command there to copy
3938
the built files from your cloned copy of Gatsby. It'll watch for your changes
4039
to Gatsby packages and copy them into the site. For more detailed instructions

docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ navigate around, Gatsby loads the JavaScript needed for each route.
165165
This means that one page with heavy imports:
166166

167167
```javascript
168-
import d3 from "d3"
169-
import threejs from "react-threejs"
168+
import d3 from "d3";
169+
import threejs from "react-threejs";
170170
```
171171

172172
...won't affect the performance of the rest of the site.
@@ -185,8 +185,8 @@ along with a modern css-in-js library
185185
uses [Redux](http://redux.js.org/) to communicate with their Django API.
186186

187187
The marketing portion of the site loads quickly with minimal JavaScript. When a
188-
potential customer goes to sign-up for the app, there's no *awkward jump from
189-
the marketing website to the web app*—just a simple page change which seamlessly
188+
potential customer goes to sign-up for the app, there's no _awkward jump from
189+
the marketing website to the web app_—just a simple page change which seamlessly
190190
loads in the needed JavaScript. The _team is sharing components and styles
191191
across the site_ without stepping on each others shoes as they rapidly iterate
192192
on features.
@@ -281,23 +281,23 @@ the blog posts. Included with the component is an exported `pageQuery`.
281281

282282
```javascript
283283
// A simple React component for rendering a blog page.
284-
import React from "react"
284+
import React from "react";
285285

286286
class BlogPostTemplate extends React.Component {
287287
render() {
288-
;<div>
288+
<div>
289289
<h1>{this.props.data.markdown.frontmatter.title}</h1>
290290
<small>{this.props.data.markdown.frontmatter.date}</small>
291291
<div
292292
dangerouslySetInnerHTML={{
293293
__html: this.props.data.markdown.html,
294294
}}
295295
/>
296-
</div>
296+
</div>;
297297
}
298298
}
299299

300-
export default BlogPostTemplate
300+
export default BlogPostTemplate;
301301

302302
export const pageQuery = `
303303
query BlogPost($slug: String!) {
@@ -311,7 +311,7 @@ export const pageQuery = `
311311
}
312312
}
313313
}
314-
`
314+
`;
315315
```
316316

317317
All data parsing and processing is plugin-driven. So in time, any imaginable

docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ project), `gatsby develop` (launch a hot-reload enabled web development server),
5050
etc.
5151

5252
We can now begin the exciting task of _actually_ developing on the site, and
53-
creating a functional, modern blog. You'll generally want to use `gatsby
54-
develop` to launch the local development server to validate functionality as we
53+
creating a functional, modern blog. You'll generally want to use `gatsby develop` to launch the local development server to validate functionality as we
5554
progress through the steps.
5655

5756
## Adding necessary plugins
@@ -87,8 +86,7 @@ with the following command:
8786
yarn add gatsby-plugin-catch-links gatsby-plugin-react-helmet
8887
```
8988

90-
We're using [yarn][yarn], but npm can just as easily be used with `npm i --save
91-
[deps]`.
89+
We're using [yarn][yarn], but npm can just as easily be used with `npm i --save [deps]`.
9290

9391
After installing each of these functional plugins, we'll edit
9492
`gatsby-config.js`, which Gatsby loads at build-time to implement the exposed
@@ -257,15 +255,15 @@ We'll want to create the file `src/templates/blog-post.js` (please create the
257255
`src/templates` folder if it does not yet exist!).
258256

259257
```javascript
260-
import React from "react"
261-
import Helmet from "react-helmet"
258+
import React from "react";
259+
import Helmet from "react-helmet";
262260

263261
// import '../css/blog-post.css'; // make it pretty!
264262

265263
export default function Template({
266264
data, // this prop will be injected by the GraphQL query we'll write in a bit
267265
}) {
268-
const { markdownRemark: post } = data // data.markdownRemark holds our post data
266+
const { markdownRemark: post } = data; // data.markdownRemark holds our post data
269267
return (
270268
<div className="blog-post-container">
271269
<Helmet title={`Your Blog Name - ${post.frontmatter.title}`} />
@@ -277,7 +275,7 @@ export default function Template({
277275
/>
278276
</div>
279277
</div>
280-
)
278+
);
281279
}
282280
```
283281

@@ -379,13 +377,13 @@ Gatsby, as detailed in its [Node API specification][node-spec]. However, we only
379377
care about one particular API in this instance, `createPages`.
380378

381379
```javascript
382-
const path = require("path")
380+
const path = require("path");
383381

384382
exports.createPages = ({ boundActionCreators, graphql }) => {
385-
const { createPage } = boundActionCreators
383+
const { createPage } = boundActionCreators;
386384

387-
const blogPostTemplate = path.resolve(`src/templates/blog-post.js`)
388-
}
385+
const blogPostTemplate = path.resolve(`src/templates/blog-post.js`);
386+
};
389387
```
390388

391389
Nothing super complex yet! We're using the `createPages` API (which Gatsby will
@@ -543,14 +541,14 @@ create `src/pages/tags.js`, the path `http://localhost:8000/tags/` will be
543541
available within the browser and the statically generated site.
544542

545543
```javascript
546-
import React from "react"
547-
import Link from "gatsby-link"
548-
import Helmet from "react-helmet"
544+
import React from "react";
545+
import Link from "gatsby-link";
546+
import Helmet from "react-helmet";
549547

550548
// import '../css/index.css'; // add some style if you want!
551549

552550
export default function Index({ data }) {
553-
const { edges: posts } = data.allMarkdownRemark
551+
const { edges: posts } = data.allMarkdownRemark;
554552
return (
555553
<div className="blog-posts">
556554
{posts
@@ -564,10 +562,10 @@ export default function Index({ data }) {
564562
<h2>{post.frontmatter.date}</h2>
565563
<p>{post.excerpt}</p>
566564
</div>
567-
)
565+
);
568566
})}
569567
</div>
570-
)
568+
);
571569
}
572570

573571
export const pageQuery = graphql`
@@ -586,7 +584,7 @@ export const pageQuery = graphql`
586584
}
587585
}
588586
}
589-
`
587+
`;
590588
```
591589

592590
OK! So we've followed a similar approach to our blog post template, so this

0 commit comments

Comments
 (0)