-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: converts frontend app to TypeScript
- Loading branch information
1 parent
d7ff60f
commit bdb68ea
Showing
28 changed files
with
527 additions
and
38 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,7 @@ | ||
**/.DS_STORE | ||
node_modules | ||
.next | ||
**/.env | ||
out | ||
**/*.pem | ||
.vercel |
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,15 @@ | ||
{ | ||
"git": { | ||
"commitMessage": "chore: release v${version}" | ||
}, | ||
"github": { | ||
"release": true | ||
}, | ||
"npm": false, | ||
"plugins": { | ||
"@release-it/conventional-changelog": { | ||
"preset": "angular", | ||
"infile": "changelog.md" | ||
} | ||
} | ||
} |
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 @@ | ||
NEXT_PUBLIC_API_URL=http://localhost:1337/graphql |
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
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,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
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,4 @@ | ||
module.exports = { | ||
// https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode | ||
reactStrictMode: true, | ||
}; |
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 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,23 @@ | ||
import React from "react"; | ||
import { AppProps } from "next/app"; | ||
import Head from "next/head"; | ||
import { ThemeProvider, CSSReset, theme } from "@chakra-ui/core"; | ||
import Layout from "components/layout"; | ||
|
||
const App = ({ Component, pageProps }: AppProps) => { | ||
return ( | ||
<> | ||
<Head> | ||
<link rel="shortcut icon" href="/images/favicon.ico" /> | ||
</Head> | ||
<ThemeProvider theme={theme}> | ||
<CSSReset /> | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
</ThemeProvider> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import React from "react"; | ||
import Head from "next/head"; | ||
import Page from "components/pages/index"; | ||
import { NextPage } from "next"; | ||
import WithGraphQL from "lib/with-graphql"; | ||
import Head from "next/head"; | ||
import React from "react"; | ||
|
||
const Home = () => { | ||
const IndexPage: NextPage = () => { | ||
return ( | ||
<WithGraphQL> | ||
<Head> | ||
<title>My Account Page</title> | ||
<title>Index Page</title> | ||
</Head> | ||
<Page /> | ||
</WithGraphQL> | ||
); | ||
}; | ||
|
||
export default Home; | ||
export default IndexPage; |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowUnreachableCode": false, | ||
"noFallthroughCasesInSwitch": true, | ||
"allowSyntheticDefaultImports": true, | ||
"downlevelIteration": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"sourceMap": true, | ||
"strictNullChecks": true, | ||
"strict": true, | ||
"pretty": true, | ||
"jsx": "react", | ||
"suppressImplicitAnyIndexErrors": true | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"outDir": "build", | ||
"declaration": true, | ||
"jsx": "react", | ||
"target": "es5", | ||
"module": "commonjs", | ||
"moduleResolution": "node" | ||
}, | ||
"exclude": [ | ||
"build", | ||
"node_modules", | ||
"coverage", | ||
"config", | ||
"src/**/*.test.ts", | ||
"src/**/*.test.tsx", | ||
"src/**/*.story.tsx" | ||
] | ||
} |
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,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"baseUrl": ".", | ||
"paths": { | ||
"*": ["/*"], | ||
"components/*": ["components/*"], | ||
"lib/*": ["lib/*"], | ||
"pages/*": ["pages/*"], | ||
"types/*": ["types/*"], | ||
"configs/*": ["configs/*"] | ||
}, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] | ||
} |
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,10 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "dist", | ||
"target": "es2017", | ||
"isolatedModules": false, | ||
"noEmit": false | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"module": "commonjs" | ||
} | ||
} |
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,82 @@ | ||
{ | ||
"extends": ["tslint-react"], | ||
"rules": { | ||
"align": [true, "parameters", "arguments", "statements"], | ||
"ban": false, | ||
"class-name": true, | ||
"comment-format": [true, "check-space"], | ||
"curly": true, | ||
"eofline": false, | ||
"forin": true, | ||
"indent": [true, "spaces"], | ||
"interface-name": [true, "never-prefix"], | ||
"jsdoc-format": true, | ||
"jsx-no-lambda": false, | ||
"jsx-no-multiline-js": false, | ||
"jsx-wrap-multiline": false, | ||
"label-position": true, | ||
"max-line-length": [true, 300], | ||
"member-ordering": [ | ||
true, | ||
"public-before-private", | ||
"static-before-instance", | ||
"variables-before-functions" | ||
], | ||
"no-any": false, | ||
"no-arg": true, | ||
"no-bitwise": true, | ||
"no-console": [false], | ||
"no-consecutive-blank-lines": true, | ||
"no-construct": true, | ||
"no-debugger": true, | ||
"no-duplicate-variable": true, | ||
"no-empty": true, | ||
"no-eval": true, | ||
"no-shadowed-variable": true, | ||
"no-string-literal": true, | ||
"no-switch-case-fall-through": true, | ||
"no-trailing-whitespace": false, | ||
"no-unused-expression": true, | ||
"no-use-before-declare": true, | ||
"one-line": [ | ||
true, | ||
"check-catch", | ||
"check-else", | ||
"check-open-brace", | ||
"check-whitespace" | ||
], | ||
"quotemark": [true, "single", "jsx-double"], | ||
"radix": true, | ||
"semicolon": [true, "always", "ignore-bound-class-methods"], | ||
"switch-default": true, | ||
"trailing-comma": false, | ||
"triple-equals": [true, "allow-null-check"], | ||
"typedef": [true, "parameter", "property-declaration"], | ||
"typedef-whitespace": [ | ||
true, | ||
{ | ||
"call-signature": "nospace", | ||
"index-signature": "nospace", | ||
"parameter": "nospace", | ||
"property-declaration": "nospace", | ||
"variable-declaration": "nospace" | ||
} | ||
], | ||
"variable-name": [ | ||
true, | ||
"ban-keywords", | ||
"check-format", | ||
"allow-leading-underscore", | ||
"allow-pascal-case" | ||
], | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-module", | ||
"check-operator", | ||
"check-separator", | ||
"check-type" | ||
] | ||
} | ||
} |
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 @@ | ||
import IUser from "types/user"; | ||
|
||
export default interface IFeed { | ||
id: string; | ||
created_at: string; | ||
body: string; | ||
author: IUser; | ||
} |
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,3 @@ | ||
declare module "next-auth/client"; | ||
declare module "next-auth"; | ||
declare module "next-auth/providers"; |
Oops, something went wrong.