-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(landing): add ghatsby w typescript
- Loading branch information
Showing
12 changed files
with
9,095 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
parser: `@typescript-eslint/parser`, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier/@typescript-eslint", | ||
], | ||
plugins: ["@typescript-eslint", "prettier"], | ||
parserOptions: { | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module", // Allows for the use of imports | ||
}, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
rules: { | ||
quotes: "off", | ||
"@typescript-eslint/quotes": [ | ||
2, | ||
"backtick", | ||
{ | ||
avoidEscape: true, | ||
}, | ||
], | ||
indent: ["error", 2, { SwitchCase: 1 }], | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
trailingComma: "es5", | ||
semi: false, | ||
singleQuote: false, | ||
printWidth: 120, | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,5 @@ node_modules/ | |
|
||
# dotenv environment variables file | ||
.env | ||
|
||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
siteMetadata: { | ||
siteName: `Poolbase`, | ||
}, | ||
plugins: [`gatsby-plugin-typescript`], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import * as React from "react" | ||
|
||
const MainLayout: React.FC = ({ children }) => <div>{children}</div> | ||
|
||
export default MainLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file is used to hold ambient type declarations, as well as type shims | ||
// for npm module without type declarations, and assets files. | ||
|
||
// For example, to shim modules without declarations, use: | ||
// declare module "package-without-declarations" | ||
|
||
// And to shim assets, use (one file extension per `declare`): | ||
// declare module "*.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from "react" | ||
import Layout from "../components/layout" | ||
|
||
export default () => ( | ||
<Layout> | ||
<h1>You are here!</h1> | ||
<h2>But nothing found for you #404</h2> | ||
</Layout> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { graphql } from "gatsby" | ||
import * as React from "react" | ||
import Layout from "../components/layout" | ||
|
||
// Please note that you can use https://github.com/dotansimha/graphql-code-generator | ||
// to generate all types from graphQL schema | ||
interface IndexPageProps { | ||
data: { | ||
site: { | ||
siteMetadata: { | ||
siteName: string | ||
} | ||
} | ||
} | ||
} | ||
|
||
export const pageQuery = graphql` | ||
query IndexQuery { | ||
site { | ||
siteMetadata { | ||
siteName | ||
} | ||
} | ||
} | ||
` | ||
|
||
export default class IndexPage extends React.Component<IndexPageProps> { | ||
readonly hello = `Hello` | ||
public render() { | ||
const { siteName } = this.props.data.site.siteMetadata | ||
return ( | ||
<Layout> | ||
<h1>{this.hello}!</h1> | ||
<p> | ||
This site is named <strong>{siteName}</strong> | ||
</p> | ||
</Layout> | ||
) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"include": ["./src/**/*"], | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "commonjs", | ||
"lib": ["dom", "es2017"], | ||
// "allowJs": true, | ||
// "checkJs": true, | ||
"jsx": "react", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"noEmit": true, | ||
"skipLibCheck": true | ||
} | ||
} |
Oops, something went wrong.