Skip to content

Commit 2b418cb

Browse files
committed
Update prettier config
1 parent e7e7f86 commit 2b418cb

File tree

9 files changed

+52
-50
lines changed

9 files changed

+52
-50
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ yarn-error.log
6767
.pnp.js
6868
# Yarn Integrity file
6969
.yarn-integrity
70+
71+
.vscode/

.prettierrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"endOfLine": "lf",
3-
"semi": false,
4-
"singleQuote": false,
3+
"semi": true,
4+
"singleQuote": true,
55
"tabWidth": 2,
66
"trailingComma": "es5"
77
}

src/components/header.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Link } from "gatsby"
2-
import PropTypes from "prop-types"
3-
import React from "react"
1+
import { Link } from 'gatsby';
2+
import PropTypes from 'prop-types';
3+
import React from 'react';
44

55
const Header = ({ siteTitle }) => (
66
<header
@@ -29,14 +29,14 @@ const Header = ({ siteTitle }) => (
2929
</h1>
3030
</div>
3131
</header>
32-
)
32+
);
3333

3434
Header.propTypes = {
3535
siteTitle: PropTypes.string,
36-
}
36+
};
3737

3838
Header.defaultProps = {
3939
siteTitle: ``,
40-
}
40+
};
4141

42-
export default Header
42+
export default Header;

src/components/image.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from "react"
2-
import { StaticQuery, graphql } from "gatsby"
3-
import Img from "gatsby-image"
1+
import React from 'react';
2+
import { StaticQuery, graphql } from 'gatsby';
3+
import Img from 'gatsby-image';
44

55
/*
66
* This component is built using `gatsby-image` to automatically serve optimized
@@ -28,5 +28,5 @@ const Image = () => (
2828
`}
2929
render={data => <Img fluid={data.placeholderImage.childImageSharp.fluid} />}
3030
/>
31-
)
32-
export default Image
31+
);
32+
export default Image;

src/components/layout.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* See: https://www.gatsbyjs.org/docs/static-query/
66
*/
77

8-
import React from "react"
9-
import PropTypes from "prop-types"
10-
import { StaticQuery, graphql } from "gatsby"
8+
import React from 'react';
9+
import PropTypes from 'prop-types';
10+
import { StaticQuery, graphql } from 'gatsby';
1111

12-
import Header from "./header"
13-
import "./layout.css"
12+
import Header from './header';
13+
import './layout.css';
1414

1515
const Layout = ({ children }) => (
1616
<StaticQuery
@@ -44,10 +44,10 @@ const Layout = ({ children }) => (
4444
</>
4545
)}
4646
/>
47-
)
47+
);
4848

4949
Layout.propTypes = {
5050
children: PropTypes.node.isRequired,
51-
}
51+
};
5252

53-
export default Layout
53+
export default Layout;

src/components/seo.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* See: https://www.gatsbyjs.org/docs/use-static-query/
66
*/
77

8-
import React from "react"
9-
import PropTypes from "prop-types"
10-
import Helmet from "react-helmet"
11-
import { useStaticQuery, graphql } from "gatsby"
8+
import React from 'react';
9+
import PropTypes from 'prop-types';
10+
import Helmet from 'react-helmet';
11+
import { useStaticQuery, graphql } from 'gatsby';
1212

1313
function SEO({ description, lang, meta, title }) {
1414
const { site } = useStaticQuery(
@@ -23,9 +23,9 @@ function SEO({ description, lang, meta, title }) {
2323
}
2424
}
2525
`
26-
)
26+
);
2727

28-
const metaDescription = description || site.siteMetadata.description
28+
const metaDescription = description || site.siteMetadata.description;
2929

3030
return (
3131
<Helmet
@@ -69,20 +69,20 @@ function SEO({ description, lang, meta, title }) {
6969
},
7070
].concat(meta)}
7171
/>
72-
)
72+
);
7373
}
7474

7575
SEO.defaultProps = {
7676
lang: `en`,
7777
meta: [],
7878
description: ``,
79-
}
79+
};
8080

8181
SEO.propTypes = {
8282
description: PropTypes.string,
8383
lang: PropTypes.string,
8484
meta: PropTypes.arrayOf(PropTypes.object),
8585
title: PropTypes.string.isRequired,
86-
}
86+
};
8787

88-
export default SEO
88+
export default SEO;

src/pages/404.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import React from "react"
1+
import React from 'react';
22

3-
import Layout from "../components/layout"
4-
import SEO from "../components/seo"
3+
import Layout from '../components/layout';
4+
import SEO from '../components/seo';
55

66
const NotFoundPage = () => (
77
<Layout>
88
<SEO title="404: Not found" />
99
<h1>NOT FOUND</h1>
1010
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
1111
</Layout>
12-
)
12+
);
1313

14-
export default NotFoundPage
14+
export default NotFoundPage;

src/pages/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react"
2-
import { Link } from "gatsby"
1+
import React from 'react';
2+
import { Link } from 'gatsby';
33

4-
import Layout from "../components/layout"
5-
import Image from "../components/image"
6-
import SEO from "../components/seo"
4+
import Layout from '../components/layout';
5+
import Image from '../components/image';
6+
import SEO from '../components/seo';
77

88
const IndexPage = () => (
99
<Layout>
@@ -16,6 +16,6 @@ const IndexPage = () => (
1616
</div>
1717
<Link to="/page-2/">Go to page 2</Link>
1818
</Layout>
19-
)
19+
);
2020

21-
export default IndexPage
21+
export default IndexPage;

src/pages/page-2.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from "react"
2-
import { Link } from "gatsby"
1+
import React from 'react';
2+
import { Link } from 'gatsby';
33

4-
import Layout from "../components/layout"
5-
import SEO from "../components/seo"
4+
import Layout from '../components/layout';
5+
import SEO from '../components/seo';
66

77
const SecondPage = () => (
88
<Layout>
@@ -11,6 +11,6 @@ const SecondPage = () => (
1111
<p>Welcome to page 2</p>
1212
<Link to="/">Go back to the homepage</Link>
1313
</Layout>
14-
)
14+
);
1515

16-
export default SecondPage
16+
export default SecondPage;

0 commit comments

Comments
 (0)