-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): upgrade frontend dependencies
- Loading branch information
Showing
28 changed files
with
4,854 additions
and
13,371 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
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,3 +1,4 @@ | ||
nodejs 22.3.0 | ||
yarn 1.22.22 | ||
direnv 2.28.0 | ||
pnpm 9.4.0 |
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,40 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:react-hooks/recommended", | ||
], | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
settings: { | ||
react: { | ||
version: "detect", // React version. "detect" automatically picks the version you have installed. | ||
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value. | ||
// It will default to "latest" and warn if missing, and to "detect" in the future | ||
}, | ||
}, | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
indent: ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
quotes: ["error", "single"], | ||
semi: ["error", "always"], | ||
"react/prop-types": 0, | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
anonymous: "always", | ||
named: "never", | ||
asyncArrow: "always", | ||
}, | ||
], | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,22 +1,30 @@ | ||
## gibbon-mail frontend | ||
# React + TypeScript + Vite | ||
|
||
``` | ||
$ yarn install | ||
``` | ||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
Before start `frontend` you need to start the [`../backend/`](../backend/) service. | ||
Currently, two official plugins are available: | ||
|
||
``` | ||
$ direnv allow | ||
$ yarn run start | ||
``` | ||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
||
Open your browser on http://127.0.0.1:3000 | ||
## Expanding the ESLint configuration | ||
|
||
``` | ||
$ yarn run lint | ||
``` | ||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
export default { | ||
// other rules... | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
} | ||
``` | ||
$ yarn run build | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list |
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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Gibbon mail</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,44 +1,40 @@ | ||
{ | ||
"name": "gibbon-mail-frontend", | ||
"version": "0.5.0", | ||
"name": "new-frontend", | ||
"private": true, | ||
"devDependencies": { | ||
"eslint": "7.11.0", | ||
"eslint-plugin-react": "7.23.1" | ||
}, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"start": "BROWSER=none NODE_OPTIONS=--openssl-legacy-provider react-scripts start", | ||
"build": "NODE_OPTIONS=--openssl-legacy-provider react-scripts build", | ||
"eject": "NODE_OPTIONS=--openssl-legacy-provider react-scripts eject", | ||
"lint": "NODE_OPTIONS=--openssl-legacy-provider eslint --ignore-path .gitignore .", | ||
"pretest": "NODE_OPTIONS=--openssl-legacy-provider eslint --ignore-path .gitignore ." | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@rjsf/bootstrap-4": "2.5.1", | ||
"@rjsf/core": "2.5.1", | ||
"axios": "0.21.1", | ||
"axios-hooks": "2.6.1", | ||
"bootstrap": "4.6.0", | ||
"@rjsf/bootstrap-4": "5.19.1", | ||
"@rjsf/core": "5.19.1", | ||
"@rjsf/validator-ajv8": "5.19.1", | ||
"axios": "1.7.2", | ||
"axios-hooks": "5.0.2", | ||
"bootstrap": "5.3.3", | ||
"lodash": "4.17.21", | ||
"react": "17.0.2", | ||
"react-bootstrap": "1.5.2", | ||
"react-dom": "17.0.2", | ||
"react-markdown": "5.0.3", | ||
"react-router": "5.2.0", | ||
"react-router-breadcrumbs-hoc": "3.3.1", | ||
"react-router-dom": "5.2.0", | ||
"react-scripts": "4.0.3" | ||
"react": "^18.3.1", | ||
"react-bootstrap": "1.6.8", | ||
"react-dom": "^18.3.1", | ||
"react-markdown": "9.0.1", | ||
"react-router-dom": "6.24.1", | ||
"use-react-router-breadcrumbs": "4.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.13.1", | ||
"@typescript-eslint/parser": "^7.13.1", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-react": "7.34.3", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-refresh": "^0.4.7", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.3.1" | ||
} | ||
} |
Oops, something went wrong.