├── .gitignore ├── README.md ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.tsx ├── components │ ├── backbutton.module.css │ ├── backbutton.tsx │ ├── button.module.css │ ├── button.tsx │ ├── comment.module.css │ ├── comment.tsx │ ├── comments.tsx │ ├── commentskeleton.module.css │ ├── commentskeleton.tsx │ ├── home.module.css │ ├── home.tsx │ ├── logo.module.css │ ├── logo.tsx │ ├── navbar.module.css │ ├── navbar.tsx │ ├── navmenu.module.css │ ├── navmenu.tsx │ ├── storydetail.module.css │ ├── storydetail.tsx │ ├── storydetailskeleton.module.css │ ├── storyitem.module.css │ ├── storyitem.tsx │ ├── storylist.module.css │ ├── storylist.tsx │ ├── threadline.module.css │ └── threadline.tsx ├── constants.tsx ├── firebase.ts ├── hooks │ ├── useCategory.ts │ ├── useStories.ts │ ├── useStory.ts │ └── useWindowSize.ts ├── images │ └── choose.svg ├── index.css ├── index.tsx ├── react-app-env.d.ts ├── serviceWorker.ts ├── setupTests.ts ├── types.d.ts └── utils.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | .vercel -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 |

6 | 7 |

8 | Hacker News with a cleaner UI. Open site 9 |

10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hackernews-cra-migration", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "@types/jest": "^24.0.0", 10 | "@types/node": "^12.0.0", 11 | "@types/react": "^16.9.41", 12 | "@types/react-dom": "^16.9.0", 13 | "@types/react-router-dom": "^5.1.5", 14 | "clsx": "^1.1.1", 15 | "firebase": "^7.15.5", 16 | "react": "^16.13.1", 17 | "react-dom": "^16.13.1", 18 | "react-icons": "^3.10.0", 19 | "react-router-dom": "^5.2.0", 20 | "react-scripts": "3.4.1", 21 | "timeago.js": "^4.0.2", 22 | "typescript": "~3.7.2" 23 | }, 24 | "scripts": { 25 | "start": "react-scripts start", 26 | "build": "react-scripts build", 27 | "test": "react-scripts test", 28 | "eject": "react-scripts eject", 29 | "deploy": "vercel --prod" 30 | }, 31 | "eslintConfig": { 32 | "extends": "react-app" 33 | }, 34 | "browserslist": { 35 | "production": [ 36 | ">0.2%", 37 | "not dead", 38 | "not op_mini all" 39 | ], 40 | "development": [ 41 | "last 1 chrome version", 42 | "last 1 firefox version", 43 | "last 1 safari version" 44 | ] 45 | }, 46 | "devDependencies": { 47 | "vercel": "^19.1.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickykebe/hackernews/32e9c811cbacdd2e73147ba7123b4b5646572298/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 24 | Hacker News 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickykebe/hackernews/32e9c811cbacdd2e73147ba7123b4b5646572298/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mickykebe/hackernews/32e9c811cbacdd2e73147ba7123b4b5646572298/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; 3 | import { Home } from "./components/home"; 4 | 5 | function App() { 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /src/components/backbutton.module.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: flex; 3 | align-items: center; 4 | background-color: white; 5 | color: var(--primary-color); 6 | padding: 0.5rem 1rem; 7 | border: 1px solid rgba(0, 0, 0, 0.1); 8 | font-weight: 300; 9 | font-size: 1rem; 10 | margin: 0 0 0.5rem; 11 | cursor: pointer; 12 | outline: none; 13 | } 14 | 15 | .root:hover { 16 | background-color: #fafafa; 17 | } 18 | 19 | .root:active { 20 | background-color: #e1e1e1; 21 | } 22 | 23 | .root:focus { 24 | border: 1px solid rgba(0, 0, 0, 0.1); 25 | } 26 | 27 | .icon { 28 | margin-right: 0.25rem; 29 | } 30 | -------------------------------------------------------------------------------- /src/components/backbutton.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import styles from "./backbutton.module.css"; 3 | import { IoIosArrowBack as BackIcon } from "react-icons/io"; 4 | 5 | interface Props { 6 | onClick?: () => void; 7 | } 8 | 9 | export function BackButton({ onClick }: Props) { 10 | return ( 11 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/components/button.module.css: -------------------------------------------------------------------------------- 1 | .root { 2 | color: white; 3 | position: relative; 4 | padding: 0.75rem 1rem; 5 | line-height: 1.25rem; 6 | font-size: 0.875rem; 7 | display: flex; 8 | justify-content: center; 9 | border: 1px solid transparent; 10 | background-color: var(--primary-color); 11 | transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); 12 | font-weight: bold; 13 | cursor: pointer; 14 | } 15 | 16 | .root:hover { 17 | background-color: var(--primary-color-light); 18 | } 19 | 20 | .root:active { 21 | background-color: var(--primary-color-dark); 22 | } 23 | 24 | .root:focus { 25 | box-shadow: 0 0 0 3px rgb(255, 102, 0, 0.45); 26 | outline: 0; 27 | } 28 | -------------------------------------------------------------------------------- /src/components/button.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import styles from "./button.module.css"; 3 | 4 | export function Button(props: JSX.IntrinsicElements["button"]) { 5 | return 48 | )} 49 | 50 | )} 51 | 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /src/components/threadline.module.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | cursor: pointer; 6 | } 7 | 8 | .emptySpace { 9 | width: 2px; 10 | height: 100%; 11 | } 12 | 13 | .line { 14 | width: 1px; 15 | background-color: rgba(0, 0, 0, 0.3); 16 | height: 100%; 17 | } 18 | 19 | .root:hover .emptySpace { 20 | width: 2px; 21 | } 22 | 23 | .root:hover .line { 24 | width: 3px; 25 | background-color: var(--primary-color); 26 | } 27 | -------------------------------------------------------------------------------- /src/components/threadline.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import styles from "./threadline.module.css"; 3 | 4 | interface Props { 5 | onClick: () => void; 6 | } 7 | 8 | export function ThreadLine({ onClick }: Props) { 9 | return ( 10 |
11 |
12 |
13 |
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/constants.tsx: -------------------------------------------------------------------------------- 1 | export const STORIES_PER_PAGE = 30; 2 | -------------------------------------------------------------------------------- /src/firebase.ts: -------------------------------------------------------------------------------- 1 | import * as firebase from "firebase/app"; 2 | import "firebase/database"; 3 | import "firebase/analytics"; 4 | 5 | class Firebase { 6 | private static _instance: Firebase; 7 | private db: firebase.database.Reference; 8 | private analytics: firebase.analytics.Analytics; 9 | private constructor() { 10 | const config = { 11 | databaseURL: "https://hacker-news.firebaseio.com", 12 | }; 13 | const myAppConfig = { 14 | apiKey: process.env.REACT_APP_API_KEY, 15 | authDomain: process.env.REACT_APP_AUTH_DOMAIN, 16 | databaseURL: process.env.REACT_APP_DB_URL, 17 | projectId: process.env.REACT_APP_PROJECT_ID, 18 | storageBucket: process.env.REACT_APP_STORAGE_BUCKET, 19 | messagingSenderId: process.env.REACT_APP_MESSAGING_SENDER_ID, 20 | appId: process.env.REACT_APP_APP_ID, 21 | measurementId: process.env.REACT_APP_MEASUREMENT_ID, 22 | }; 23 | const hnApp = firebase.initializeApp(config, "hnapp"); 24 | const myApp = firebase.initializeApp(myAppConfig, "myapp"); 25 | this.db = hnApp.database().ref("/v0"); 26 | this.analytics = myApp.analytics(); 27 | } 28 | static getInstance() { 29 | if (!this._instance) { 30 | this._instance = new Firebase(); 31 | } 32 | return this._instance; 33 | } 34 | 35 | storiesRef(category: StoryCategory) { 36 | return this.db.child(category); 37 | } 38 | 39 | item(itemId: number) { 40 | return this.db.child(`item/${itemId}`); 41 | } 42 | } 43 | 44 | export { Firebase }; 45 | -------------------------------------------------------------------------------- /src/hooks/useCategory.ts: -------------------------------------------------------------------------------- 1 | import { useParams } from "react-router-dom"; 2 | import { pageCategory } from "../utils"; 3 | 4 | export function useCategory(page?: PageUrl) { 5 | const { page: pageMatch } = useParams(); 6 | let pageValue: PageUrl; 7 | if (page) { 8 | pageValue = page; 9 | } else if (pageMatch in pageCategory) { 10 | pageValue = pageMatch; 11 | } else { 12 | pageValue = "top"; 13 | } 14 | return pageCategory[pageValue]; 15 | } 16 | -------------------------------------------------------------------------------- /src/hooks/useStories.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Firebase } from "../firebase"; 3 | 4 | export function useStories(category: StoryCategory) { 5 | const [storyIds, setStoryIds] = React.useState([]); 6 | React.useEffect(() => { 7 | const handler = (snapshot: firebase.database.DataSnapshot) => { 8 | setStoryIds(snapshot.val()); 9 | }; 10 | const storiesRef = Firebase.getInstance().storiesRef(category); 11 | storiesRef.on("value", handler); 12 | return () => { 13 | storiesRef.off("value", handler); 14 | }; 15 | }, [category]); 16 | 17 | return storyIds; 18 | } 19 | -------------------------------------------------------------------------------- /src/hooks/useStory.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Firebase } from "../firebase"; 3 | 4 | export function useStory(id: number) { 5 | const [story, setStory] = React.useState(() => { 6 | const storyStr = sessionStorage.getItem(String(id)); 7 | if (storyStr) { 8 | return JSON.parse(storyStr); 9 | } 10 | }); 11 | React.useEffect(() => { 12 | const handler = (snapshot: firebase.database.DataSnapshot) => { 13 | setStory(snapshot.val()); 14 | }; 15 | const storyRef = Firebase.getInstance().item(id); 16 | storyRef.on("value", handler); 17 | return () => { 18 | storyRef.off("value", handler); 19 | }; 20 | }, [id]); 21 | React.useEffect(() => { 22 | if (story) { 23 | try { 24 | sessionStorage.setItem(String(story.id), JSON.stringify(story)); 25 | } catch (err) {} 26 | } 27 | }, [story]); 28 | return story; 29 | } 30 | -------------------------------------------------------------------------------- /src/hooks/useWindowSize.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | export function useWindowSize() { 4 | const isClient = typeof window === "object"; 5 | 6 | const getSize = React.useCallback(() => { 7 | return { 8 | width: isClient ? window.innerWidth : undefined, 9 | height: isClient ? window.innerHeight : undefined, 10 | }; 11 | }, [isClient]); 12 | 13 | const [windowSize, setWindowSize] = React.useState(getSize); 14 | 15 | React.useEffect(() => { 16 | if (!isClient) { 17 | return; 18 | } 19 | function handleResize() { 20 | setWindowSize(getSize()); 21 | } 22 | window.addEventListener("resize", handleResize); 23 | return () => window.removeEventListener("resize", handleResize); 24 | }, [getSize, isClient]); 25 | 26 | return windowSize; 27 | } 28 | -------------------------------------------------------------------------------- /src/images/choose.svg: -------------------------------------------------------------------------------- 1 | Choose -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;700&display=swap"); 2 | 3 | :root { 4 | box-sizing: border-box; 5 | --primary-color: #ff6600; 6 | --primary-color-dark: #b44600; 7 | --primary-color-light: rgba(255, 102, 0, 0.7); 8 | --text-primary: #272727; 9 | --text-secondary: #7d7f80; 10 | --lightgrey: rgba(211, 211, 211, 0.5); 11 | font-family: "Roboto Slab", serif; 12 | line-height: 1.5; 13 | } 14 | * { 15 | box-sizing: inherit; 16 | margin: 0; 17 | padding: 0; 18 | } 19 | 20 | main { 21 | height: 100vh; 22 | } 23 | 24 | @media (max-width: 960px) { 25 | :root { 26 | font-size: 87.5%; 27 | } 28 | } 29 | 30 | @media (max-width: 500px) { 31 | :root { 32 | font-size: 75%; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import { BrowserRouter as Router } from "react-router-dom"; 4 | import "./index.css"; 5 | import App from "./App"; 6 | import * as serviceWorker from "./serviceWorker"; 7 | 8 | ReactDOM.render( 9 | 10 | 11 | 12 | 13 | , 14 | document.getElementById("root") 15 | ); 16 | 17 | // If you want your app to work offline and load faster, you can change 18 | // unregister() to register() below. Note this comes with some pitfalls. 19 | // Learn more about service workers: https://bit.ly/CRA-PWA 20 | serviceWorker.unregister(); 21 | -------------------------------------------------------------------------------- /src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/serviceWorker.ts: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.0/8 are considered localhost for IPv4. 18 | window.location.hostname.match( 19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 20 | ) 21 | ); 22 | 23 | type Config = { 24 | onSuccess?: (registration: ServiceWorkerRegistration) => void; 25 | onUpdate?: (registration: ServiceWorkerRegistration) => void; 26 | }; 27 | 28 | export function register(config?: Config) { 29 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 30 | // The URL constructor is available in all browsers that support SW. 31 | const publicUrl = new URL( 32 | process.env.PUBLIC_URL, 33 | window.location.href 34 | ); 35 | if (publicUrl.origin !== window.location.origin) { 36 | // Our service worker won't work if PUBLIC_URL is on a different origin 37 | // from what our page is served on. This might happen if a CDN is used to 38 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 39 | return; 40 | } 41 | 42 | window.addEventListener('load', () => { 43 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 44 | 45 | if (isLocalhost) { 46 | // This is running on localhost. Let's check if a service worker still exists or not. 47 | checkValidServiceWorker(swUrl, config); 48 | 49 | // Add some additional logging to localhost, pointing developers to the 50 | // service worker/PWA documentation. 51 | navigator.serviceWorker.ready.then(() => { 52 | console.log( 53 | 'This web app is being served cache-first by a service ' + 54 | 'worker. To learn more, visit https://bit.ly/CRA-PWA' 55 | ); 56 | }); 57 | } else { 58 | // Is not localhost. Just register service worker 59 | registerValidSW(swUrl, config); 60 | } 61 | }); 62 | } 63 | } 64 | 65 | function registerValidSW(swUrl: string, config?: Config) { 66 | navigator.serviceWorker 67 | .register(swUrl) 68 | .then(registration => { 69 | registration.onupdatefound = () => { 70 | const installingWorker = registration.installing; 71 | if (installingWorker == null) { 72 | return; 73 | } 74 | installingWorker.onstatechange = () => { 75 | if (installingWorker.state === 'installed') { 76 | if (navigator.serviceWorker.controller) { 77 | // At this point, the updated precached content has been fetched, 78 | // but the previous service worker will still serve the older 79 | // content until all client tabs are closed. 80 | console.log( 81 | 'New content is available and will be used when all ' + 82 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' 83 | ); 84 | 85 | // Execute callback 86 | if (config && config.onUpdate) { 87 | config.onUpdate(registration); 88 | } 89 | } else { 90 | // At this point, everything has been precached. 91 | // It's the perfect time to display a 92 | // "Content is cached for offline use." message. 93 | console.log('Content is cached for offline use.'); 94 | 95 | // Execute callback 96 | if (config && config.onSuccess) { 97 | config.onSuccess(registration); 98 | } 99 | } 100 | } 101 | }; 102 | }; 103 | }) 104 | .catch(error => { 105 | console.error('Error during service worker registration:', error); 106 | }); 107 | } 108 | 109 | function checkValidServiceWorker(swUrl: string, config?: Config) { 110 | // Check if the service worker can be found. If it can't reload the page. 111 | fetch(swUrl, { 112 | headers: { 'Service-Worker': 'script' } 113 | }) 114 | .then(response => { 115 | // Ensure service worker exists, and that we really are getting a JS file. 116 | const contentType = response.headers.get('content-type'); 117 | if ( 118 | response.status === 404 || 119 | (contentType != null && contentType.indexOf('javascript') === -1) 120 | ) { 121 | // No service worker found. Probably a different app. Reload the page. 122 | navigator.serviceWorker.ready.then(registration => { 123 | registration.unregister().then(() => { 124 | window.location.reload(); 125 | }); 126 | }); 127 | } else { 128 | // Service worker found. Proceed as normal. 129 | registerValidSW(swUrl, config); 130 | } 131 | }) 132 | .catch(() => { 133 | console.log( 134 | 'No internet connection found. App is running in offline mode.' 135 | ); 136 | }); 137 | } 138 | 139 | export function unregister() { 140 | if ('serviceWorker' in navigator) { 141 | navigator.serviceWorker.ready 142 | .then(registration => { 143 | registration.unregister(); 144 | }) 145 | .catch(error => { 146 | console.error(error.message); 147 | }); 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /src/types.d.ts: -------------------------------------------------------------------------------- 1 | type PageUrl = "top" | "new" | "show" | "ask" | "jobs" | "best"; 2 | 3 | type StoryCategory = 4 | | "askstories" 5 | | "jobstories" 6 | | "newstories" 7 | | "showstories" 8 | | "topstories" 9 | | "beststories"; 10 | 11 | interface Story { 12 | id: number; 13 | deleted: boolean; 14 | type: "job" | "story" | "comment" | "poll" | "pollopt"; 15 | by: string; 16 | time: number; 17 | text: string; 18 | dead: boolean; 19 | parent: number; 20 | poll: number; 21 | kids: number[]; 22 | url: string; 23 | score: number; 24 | title: string; 25 | parts: number[]; 26 | descendants: number; 27 | } 28 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | export const pageCategory: { [key in PageUrl]: StoryCategory } = { 2 | top: "topstories", 3 | new: "newstories", 4 | ask: "askstories", 5 | show: "showstories", 6 | jobs: "jobstories", 7 | best: "beststories", 8 | }; 9 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "noEmit": true, 20 | "jsx": "react" 21 | }, 22 | "include": [ 23 | "src" 24 | ] 25 | } 26 | --------------------------------------------------------------------------------