-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working with CRA is a bit of a pain and there's been work to move off of it. I didn't update #57 since that involves the creation of a backend server too (which involves setting up XVM and all that) and this is more of an instant change, although rebasing that PR too would be good (maybe over IAP when ppl have more time?). This PR moves off of CRA and moves to Vite. This also involves having to recreate some of the tooling integrated into CRA, such as an eslint config (a lot of the diffs in component files were issues flagged by tseslint that weren't being checked before). I didn't really have to change the workings of any components, which was nice. This issue also resolves all the security vulnerabilities found when running `npm install`, and also closes #89. Doing this would probably make anything we want to do in the future, such as adding tests (which can be done with [Vitest](https://vitest.dev/)) or integrating a backend server (which can be done using [a plugin](https://github.com/axe-me/vite-plugin-node)), a bit easier.
- Loading branch information
Showing
35 changed files
with
8,654 additions
and
30,362 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
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 +1 @@ | ||
REACT_APP_GOOGLE_CLIENT_ID=706375540729-sqnnig7o0d0uqmvav0h8nh8aft6l55u3.apps.googleusercontent.com | ||
VITE_GOOGLE_CLIENT_ID=706375540729-sqnnig7o0d0uqmvav0h8nh8aft6l55u3.apps.googleusercontent.com |
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 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
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,45 @@ | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import reactHooks from "eslint-plugin-react-hooks"; | ||
import reactRefresh from "eslint-plugin-react-refresh"; | ||
import tseslint from "typescript-eslint"; | ||
import eslintConfigPrettier from "eslint-config-prettier"; | ||
|
||
export default tseslint.config( | ||
{ ignores: ["dist"] }, | ||
{ | ||
extends: [ | ||
js.configs.recommended, | ||
...tseslint.configs.recommended, | ||
eslintConfigPrettier, | ||
], | ||
files: ["**/*.{ts,tsx}"], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
"react-hooks": reactHooks, | ||
"react-refresh": reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
args: "all", | ||
argsIgnorePattern: "^_", | ||
caughtErrors: "all", | ||
caughtErrorsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
ignoreRestSiblings: 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,18 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Hydrant</title> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="description" | ||
content="Hydrant is a class planner for MIT students." | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<!-- <script defer src="https://apis.google.com/js/client.js"></script> --> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.