From e92185034135abb9fe7af34efd1194675ab703da Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2020 19:01:02 +0000 Subject: [PATCH 1/5] Bump typescript from 4.0.5 to 4.1.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 04ddcc5f..1c47099d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "react-scripts": "4.0.1", "react-spinners": "^0.9.0", "sass": "^1.29.0", - "typescript": "^4.0.5" + "typescript": "^4.1.2" }, "engines": { "node": "^14.11.0", diff --git a/yarn.lock b/yarn.lock index cf61d8d4..2a29d152 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14448,10 +14448,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" - integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== +typescript@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" + integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== unbzip2-stream@^1.3.3: version "1.4.3" From c703bc2e21c7beaf0e9109083a251a6a51ca6f1b Mon Sep 17 00:00:00 2001 From: Isai Lopez Date: Mon, 23 Nov 2020 11:10:01 -0800 Subject: [PATCH 2/5] added changes in preparation for React 17 --- .gitignore | 2 ++ tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bae3a26f..7dd878ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +.eslintcache + .env* !.env.sample diff --git a/tsconfig.json b/tsconfig.json index 4849612e..a27c1f6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react", + "jsx": "react-jsx", "sourceMap": true, "watch": true, "noFallthroughCasesInSwitch": true From 143e1cf3339b0b40170a21e97a37b0e89cff1fa3 Mon Sep 17 00:00:00 2001 From: Isai Lopez Date: Mon, 23 Nov 2020 11:21:24 -0800 Subject: [PATCH 3/5] added linting to json and yaml --- .github/workflows/main.yml | 26 +++++++++++++------------- firebase.json | 14 +++----------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6c033b8..66929e8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,14 +6,14 @@ env: on: push: - branches: [ main, production ] + branches: [main, production] pull_request: - branches: [ main, production, feature/** ] + branches: [main, production, feature/**] jobs: - static-analysis: - runs-on: ubuntu-latest - steps: + static-analysis: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v1 @@ -23,11 +23,11 @@ jobs: run: yarn install --frozen-lockfile - name: Lint run: yarn lint - + js-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - name: Setup Node.js uses: actions/setup-node@v1 with: @@ -36,7 +36,7 @@ jobs: run: yarn install --frozen-lockfile - name: Create Test Build run: yarn build - - name: Running JS tests + - name: Running JS tests run: yarn test:ci build: @@ -76,8 +76,8 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - name: Deploy to Firebase -- Production - run: yarn deploy:production --token $token - env: + run: yarn deploy:production --token $token + env: token: ${{ secrets.FIREBASE_TOKEN }} auto-deploy-to-test: @@ -98,6 +98,6 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - name: Deploy to Firebase -- Test - run: yarn deploy:test --token $token - env: + run: yarn deploy:test --token $token + env: token: ${{ secrets.FIREBASE_TOKEN }} diff --git a/firebase.json b/firebase.json index b1532a14..43622952 100644 --- a/firebase.json +++ b/firebase.json @@ -3,26 +3,18 @@ { "target": "production", "public": "build", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "**", "destination": "/index.html" } ] - }, + }, { "public": "build", "target": "test", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { "source": "**", From a96d8f8a921401a5fe112d08cd58ab7e78cd2fd1 Mon Sep 17 00:00:00 2001 From: Isai Lopez Date: Sat, 28 Nov 2020 22:24:58 -0800 Subject: [PATCH 4/5] turned off unnecessary eslint rules --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 2148b976..9e2c2ddb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,6 +20,8 @@ module.exports = { "no-var": "error", "no-console": ["error"], "prettier/prettier": "error", + "react/jsx-uses-react": "off", + "react/react-in-jsx-scope": "off", }, globals: { page: true, From 3da083ac576dd60b7a942902109c480e51a4946b Mon Sep 17 00:00:00 2001 From: Isai Lopez Date: Sat, 28 Nov 2020 22:27:00 -0800 Subject: [PATCH 5/5] changed import statements for react --- src/App.tsx | 2 +- src/components/Button/index.view.tsx | 2 +- src/components/EmailSubscription/index.view.tsx | 3 ++- src/components/Navbar/index.view.tsx | 2 +- src/components/PostcardStack/index.view.tsx | 2 +- src/index.tsx | 6 +++--- src/routes/routes.tsx | 2 +- src/views/Hero/index.view.tsx | 2 +- src/views/Home/index.view.tsx | 2 +- src/views/Information/index.view.tsx | 2 +- src/views/Schedule/index.view.tsx | 2 +- src/views/Sponsorship/index.view.tsx | 2 +- src/views/Team/index.view.tsx | 2 +- 13 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3b091eca..698e7553 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import Routes from "routes/routes"; const App: React.FC = () => { diff --git a/src/components/Button/index.view.tsx b/src/components/Button/index.view.tsx index 031b8462..c0de5a9c 100644 --- a/src/components/Button/index.view.tsx +++ b/src/components/Button/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import "./Button.scss"; export interface ButtonProps { diff --git a/src/components/EmailSubscription/index.view.tsx b/src/components/EmailSubscription/index.view.tsx index 677b75d2..1555073e 100644 --- a/src/components/EmailSubscription/index.view.tsx +++ b/src/components/EmailSubscription/index.view.tsx @@ -1,4 +1,5 @@ -import React, { useState } from "react"; +import { useState } from "react"; +import * as React from "react"; import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; import { ReactComponent as Arrow } from "images/arrow.svg"; import ClipLoader from "react-spinners/ClipLoader"; diff --git a/src/components/Navbar/index.view.tsx b/src/components/Navbar/index.view.tsx index 27af4fa3..adadf04a 100644 --- a/src/components/Navbar/index.view.tsx +++ b/src/components/Navbar/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import Button, { ButtonProps } from "components/Button/index.view"; import "./Navbar.scss"; diff --git a/src/components/PostcardStack/index.view.tsx b/src/components/PostcardStack/index.view.tsx index 03671d13..64521bc1 100644 --- a/src/components/PostcardStack/index.view.tsx +++ b/src/components/PostcardStack/index.view.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -import React from "react"; +import * as React from "react"; import "./PostcardStack.scss"; interface PostcardStackProps { diff --git a/src/index.tsx b/src/index.tsx index 2504d7eb..8ddafb78 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,13 +1,13 @@ -import React from "react"; +import { StrictMode } from "react"; import ReactDOM from "react-dom"; import "stylesheets/base.scss"; import App from "./App"; import * as serviceWorker from "./serviceWorker"; ReactDOM.render( - + - , + , document.getElementById("root") ); diff --git a/src/routes/routes.tsx b/src/routes/routes.tsx index 7674d231..29b77b82 100644 --- a/src/routes/routes.tsx +++ b/src/routes/routes.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; import HomepageView from "views/Home/index.view"; diff --git a/src/views/Hero/index.view.tsx b/src/views/Hero/index.view.tsx index 88c9672a..e084b033 100644 --- a/src/views/Hero/index.view.tsx +++ b/src/views/Hero/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import cx from "classnames"; import PostcardStack from "components/PostcardStack/index.view"; diff --git a/src/views/Home/index.view.tsx b/src/views/Home/index.view.tsx index 5e480446..9c73fd6d 100644 --- a/src/views/Home/index.view.tsx +++ b/src/views/Home/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import HeroView from "views/Hero/index.view"; // import Navbar from "components/Navbar/index.view"; import Button from "components/Button/index.view"; diff --git a/src/views/Information/index.view.tsx b/src/views/Information/index.view.tsx index 073f61bc..10f1e19a 100644 --- a/src/views/Information/index.view.tsx +++ b/src/views/Information/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import "./Information.scss"; const InformationPageView: React.FC = () => { diff --git a/src/views/Schedule/index.view.tsx b/src/views/Schedule/index.view.tsx index 8a922f32..372f82f8 100644 --- a/src/views/Schedule/index.view.tsx +++ b/src/views/Schedule/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import "./Schedule.scss"; const SchedulePageView: React.FC = () => { diff --git a/src/views/Sponsorship/index.view.tsx b/src/views/Sponsorship/index.view.tsx index e9ac8c95..99f809c7 100644 --- a/src/views/Sponsorship/index.view.tsx +++ b/src/views/Sponsorship/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import "./Sponsorship.scss"; const SponsorshipPageView: React.FC = () => { diff --git a/src/views/Team/index.view.tsx b/src/views/Team/index.view.tsx index 80103d6c..729ca7a6 100644 --- a/src/views/Team/index.view.tsx +++ b/src/views/Team/index.view.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import * as React from "react"; import "./Team.scss"; const TeamPageView: React.FC = () => {