From 827aa33197e325c89445d006f5fec3be53eede69 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Tue, 5 Nov 2019 13:22:06 -0800 Subject: [PATCH] Fixed linting --- with-gatsby/README.md | 2 +- with-gatsby/src/components/Header.tsx | 61 +++++++++++++-------------- with-gatsby/src/components/Layout.tsx | 4 +- with-gatsby/src/components/SEO.tsx | 8 ++-- with-gatsby/src/pages/404.tsx | 2 +- with-gatsby/src/pages/index.tsx | 3 +- 6 files changed, 39 insertions(+), 41 deletions(-) diff --git a/with-gatsby/README.md b/with-gatsby/README.md index 4ea1aac..d06dcea 100644 --- a/with-gatsby/README.md +++ b/with-gatsby/README.md @@ -49,4 +49,4 @@ Using Gatsby with Expo will enable you to [prerender](https://www.netlify.com/bl ### 👀 More Info -- Related: [Expo support PR](https://github.com/slorber/gatsby-plugin-react-native-web/pull/14) \ No newline at end of file +- Related: [Expo support PR](https://github.com/slorber/gatsby-plugin-react-native-web/pull/14) diff --git a/with-gatsby/src/components/Header.tsx b/with-gatsby/src/components/Header.tsx index 104a4a7..44fe799 100644 --- a/with-gatsby/src/components/Header.tsx +++ b/with-gatsby/src/components/Header.tsx @@ -1,42 +1,41 @@ -import { Link } from "gatsby" -import PropTypes from "prop-types" -import React from "react" -import { View, Text } from 'react-native'; - +import { Link } from 'gatsby'; +import PropTypes from 'prop-types'; +import React from 'react'; +import { Text, View } from 'react-native'; import { useREM } from 'react-native-web-hooks'; const Header = ({ siteTitle }) => { - - const accessibilityRole: any = 'banner' - return ( - + + const accessibilityRole: any = 'banner' + return ( - - - {siteTitle} - - + + + + {siteTitle} + + + - -) + ) } Header.propTypes = { siteTitle: PropTypes.string, diff --git a/with-gatsby/src/components/Layout.tsx b/with-gatsby/src/components/Layout.tsx index d5a6511..c820f15 100644 --- a/with-gatsby/src/components/Layout.tsx +++ b/with-gatsby/src/components/Layout.tsx @@ -12,7 +12,7 @@ import { Text, View } from 'react-native'; import Header from './header'; const Anchor = (props: any) => { - return + return } const Layout = ({ children }) => { @@ -42,7 +42,7 @@ const Layout = ({ children }) => { © {new Date().getFullYear()}, Built with {` `} - Gatsby + Gatsby diff --git a/with-gatsby/src/components/SEO.tsx b/with-gatsby/src/components/SEO.tsx index e15f599..857ced0 100644 --- a/with-gatsby/src/components/SEO.tsx +++ b/with-gatsby/src/components/SEO.tsx @@ -4,11 +4,11 @@ * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ +import { graphql, useStaticQuery } from 'gatsby'; +import PropTypes from 'prop-types'; +import React from 'react'; +import Helmet from 'react-helmet'; -import React from "react" -import PropTypes from "prop-types" -import Helmet from "react-helmet" -import { useStaticQuery, graphql } from "gatsby" function SEO({ description, lang, meta, title }) { const { site } = useStaticQuery( diff --git a/with-gatsby/src/pages/404.tsx b/with-gatsby/src/pages/404.tsx index d797b30..76cdde4 100644 --- a/with-gatsby/src/pages/404.tsx +++ b/with-gatsby/src/pages/404.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Text } from 'react-native'; +import { useREM } from 'react-native-web-hooks'; import Layout from '../components/layout'; import SEO from '../components/seo'; -import { useREM } from 'react-native-web-hooks'; const NotFoundPage = () => ( diff --git a/with-gatsby/src/pages/index.tsx b/with-gatsby/src/pages/index.tsx index 09ba2b4..ffcde50 100644 --- a/with-gatsby/src/pages/index.tsx +++ b/with-gatsby/src/pages/index.tsx @@ -21,7 +21,7 @@ const IndexPage = () => { const styles = StyleSheet.create({ header: { - fontWeight: 'bold', + fontWeight: 'bold', marginBottom: 24, }, paragraph: { @@ -30,5 +30,4 @@ const styles = StyleSheet.create({ } }) - export default IndexPage