-
Notifications
You must be signed in to change notification settings - Fork 70
Initial Template Setup #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bdf2f77
initial tmeplate setup with next.js and typescript
hwong0305 e741e51
added eslint and prettier config files
hwong0305 00c2661
updated readme and added eslint configuration
hwong0305 85a0e2f
added link to react typescript youtube tutorial
hwong0305 c02dc02
changed youtube link to thumbnail and expanded on how to start
hwong0305 27113fe
updated verbage
hwong0305 c5e02f9
disable skipLibCheck
hwong0305 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| { | ||
| "env": { | ||
| "browser": true, | ||
| "es6": true, | ||
| "node": true | ||
| }, | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:react/recommended", | ||
| "plugin:@typescript-eslint/eslint-recommended", | ||
| "plugin:prettier/recommended", | ||
| "prettier/@typescript-eslint" | ||
| ], | ||
| "globals": { | ||
| "Atomics": "readonly", | ||
| "SharedArrayBuffer": "readonly" | ||
| }, | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaFeatures": { | ||
| "jsx": true | ||
| }, | ||
| "ecmaVersion": 2018, | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": [ | ||
| "react", | ||
| "@typescript-eslint" | ||
| ], | ||
| "rules": { | ||
| }, | ||
| "settings": { | ||
| "react": { | ||
| "version": "detect" | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 = { | ||
| semi: false, | ||
| singleQuote: true, | ||
| parser: 'typescript', | ||
| trailingComma: 'none', | ||
| }; |
This file contains hidden or 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,3 +1,26 @@ | ||
| # c0d3.com | ||
|
|
||
| Repo for c0d3.com. A website to train people to be full stack software engineers. | ||
| Repo for c0d3.com powered by NextJS. A website to train people to be full stack software engineers. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.JS | ||
| - Git | ||
|
|
||
| ## How to Start | ||
|
|
||
| 1. Clone the repository with SSH or HTTPS | ||
| > SSH - `git clone [email protected]:garageScript/c0d3.com.git` | ||
|
|
||
| > HTTPS - `git clone https://github.com/garageScript/c0d3.com.git` | ||
| 2. After cloning the repository, run `npm install`. | ||
| 3. Start the local development server with `npm run dev`. | ||
| 4. Navigate to `http://localhost:3000` to view your application. | ||
|
|
||
| ## Contributing | ||
|
|
||
| Watch the video below to find out how to develop with TypeScript in React | ||
|
|
||
| [](https://www.youtube.com/watch?v=Z5iWr6Srsj8) | ||
|
|
||
| Before submitting your code run `npm run autofix`. |
Empty file.
This file contains hidden or 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 hidden or 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,32 @@ | ||
| { | ||
| "name": "with-typescript", | ||
| "version": "1.0.0", | ||
| "scripts": { | ||
| "dev": "next", | ||
| "build": "next build", | ||
| "start": "next start", | ||
| "lint": "eslint . --ext .ts --ext .tsx", | ||
| "autofix": "eslint . --ext .ts --ext .tsx --fix", | ||
| "type-check": "tsc" | ||
| }, | ||
| "dependencies": { | ||
| "isomorphic-unfetch": "3.0.0", | ||
| "next": "latest", | ||
| "react": "^16.12.0", | ||
| "react-dom": "^16.12.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^12.12.21", | ||
| "@types/react": "^16.9.16", | ||
| "@types/react-dom": "^16.9.4", | ||
| "@typescript-eslint/eslint-plugin": "^2.17.0", | ||
| "@typescript-eslint/parser": "^2.17.0", | ||
| "eslint": "^6.8.0", | ||
| "eslint-config-prettier": "^6.9.0", | ||
| "eslint-plugin-prettier": "^3.1.2", | ||
| "eslint-plugin-react": "^7.18.0", | ||
| "prettier": "^1.19.1", | ||
| "typescript": "3.7.3" | ||
| }, | ||
| "license": "ISC" | ||
| } |
This file contains hidden or 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 @@ | ||
| import * as React from 'react' | ||
|
|
||
| const IndexPage: React.FC = () => { | ||
| return <h1>c0d3.com under construction</h1> | ||
| } | ||
|
|
||
| export default IndexPage |
This file contains hidden or 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 @@ | ||
| import * as React from 'react' | ||
|
|
||
| const Login: React.FC = () => { | ||
| return <h1>Login</h1> | ||
| } | ||
|
|
||
| export default Login |
This file contains hidden or 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 @@ | ||
| import * as React from 'react' | ||
|
|
||
| const Register: React.FC = () => { | ||
| return <h1>Register</h1> | ||
| } | ||
|
|
||
| export default Register |
This file contains hidden or 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 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "allowJs": true, | ||
| "alwaysStrict": true, | ||
| "esModuleInterop": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "isolatedModules": true, | ||
| "jsx": "preserve", | ||
| "lib": ["dom", "es2017"], | ||
| "module": "esnext", | ||
| "moduleResolution": "node", | ||
| "noEmit": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| "noUnusedLocals": true, | ||
| "noUnusedParameters": true, | ||
| "resolveJsonModule": true, | ||
| "skipLibCheck": true, | ||
| "strict": true, | ||
| "target": "esnext" | ||
| }, | ||
| "exclude": ["node_modules"], | ||
| "include": ["**/*.ts", "**/*.tsx"] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These compiler options look pretty good. Is there a reason why
"skipLibCheck": trueis being used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no particular reason. I kept the default settings generated by next.js.