9 |
10 | Page not found
11 |
12 |
13 | Page not found
14 | The requested page is unavailable.
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | const siteMetadata = {
2 | name: 'Gatsby Strict Starter',
3 | description:
4 | 'Demo for a Gatsby starter with strict linting and auto-formatting rules.',
5 | };
6 |
7 | module.exports = {
8 | siteMetadata,
9 | plugins: [
10 | 'gatsby-plugin-chakra-ui',
11 | 'gatsby-plugin-emotion',
12 | {
13 | resolve: 'gatsby-plugin-manifest',
14 | options: {
15 | ...siteMetadata,
16 | display: 'minimal-ui',
17 | theme_color: '#663399',
18 | background_color: 'white',
19 | icon: 'src/assets/favicon.png',
20 | lang: 'en-US',
21 | start_url: '/',
22 | },
23 | },
24 | 'gatsby-plugin-react-helmet',
25 | 'gatsby-plugin-typescript',
26 | ],
27 | };
28 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": { "browser": true },
4 | "parserOptions": { "project": "./tsconfig.json" },
5 | "extends": [
6 | "airbnb-typescript",
7 | "airbnb/hooks",
8 | "plugin:@typescript-eslint/eslint-recommended",
9 | "plugin:@typescript-eslint/recommended",
10 | "plugin:jest/recommended",
11 | "plugin:testing-library/recommended",
12 | "plugin:testing-library/react",
13 | "prettier",
14 | "prettier/@typescript-eslint",
15 | "prettier/react"
16 | ],
17 | "plugins": ["simple-import-sort"],
18 |
19 | "rules": {
20 | // Auto-sort imports
21 | "sort-imports": "off",
22 | "import/order": "off",
23 | "simple-import-sort/sort": "error",
24 |
25 | // Using a type system makes it safe enough to spread props
26 | "react/jsx-props-no-spreading": "off"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/Layout.tsx:
--------------------------------------------------------------------------------
1 | import { graphql, useStaticQuery } from 'gatsby';
2 | import React from 'react';
3 | import { Helmet } from 'react-helmet';
4 |
5 | export interface LayoutProps {
6 | children: React.ReactNode;
7 | }
8 |
9 | export function Layout({ children }: LayoutProps): JSX.Element {
10 | const data = useStaticQuery(graphql`
11 | {
12 | site {
13 | siteMetadata {
14 | name
15 | description
16 | }
17 | }
18 | }
19 | `);
20 |
21 | return (
22 |