From 5b0a54bfb7c01d687aaf765032cf363b63058609 Mon Sep 17 00:00:00 2001 From: boojack Date: Thu, 26 Jan 2023 00:35:50 +0800 Subject: [PATCH] chore: clean `package.json` (#993) * chore: clean `package.json` * chore: update --- .github/workflows/frontend-tests.yml | 15 - web/jest.config.js | 9 - web/package.json | 14 +- web/src/components/DailyReviewDialog.tsx | 2 +- web/src/components/GitHubBadge.tsx | 2 +- web/src/components/Icon.ts | 2 +- web/src/components/MemoEditor.tsx | 6 +- web/src/components/ShareMemoDialog.tsx | 2 +- web/src/components/UpdateAccountDialog.tsx | 2 +- web/src/main.tsx | 4 +- web/src/store/module/dialog.ts | 2 +- web/src/store/module/memo.ts | 2 +- web/vite.config.ts | 12 +- web/yarn.lock | 2019 ++------------------ 14 files changed, 219 insertions(+), 1874 deletions(-) delete mode 100644 web/jest.config.js diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 76748f10..56b6abb0 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -22,21 +22,6 @@ jobs: run: yarn lint working-directory: web - jest-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: "18" - cache: yarn - cache-dependency-path: "web/yarn.lock" - - run: yarn - working-directory: web - - name: Run jest - run: yarn test - working-directory: web - frontend-build: runs-on: ubuntu-latest steps: diff --git a/web/jest.config.js b/web/jest.config.js deleted file mode 100644 index 446412e0..00000000 --- a/web/jest.config.js +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable no-undef */ -/** @type {import('ts-jest').JestConfigWithTsJest} */ -module.exports = { - preset: "ts-jest", - testEnvironment: "node", - moduleNameMapper: { - "lodash-es": "lodash", - }, -}; diff --git a/web/package.json b/web/package.json index a5520a56..53ccfc77 100644 --- a/web/package.json +++ b/web/package.json @@ -3,8 +3,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "lint": "eslint --ext .js,.ts,.tsx, src", - "test": "jest --passWithNoTests" + "lint": "eslint --ext .js,.ts,.tsx, src" }, "dependencies": { "@emotion/react": "^11.10.5", @@ -17,11 +16,11 @@ "highlight.js": "^11.6.0", "i18next": "^21.9.2", "lodash-es": "^4.17.21", + "lucide-react": "^0.105.0", "qrcode.react": "^3.1.0", "qs": "^6.11.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-feather": "^2.0.10", "react-i18next": "^11.18.6", "react-redux": "^8.0.1", "react-router-dom": "^6.4.0", @@ -29,7 +28,6 @@ "tailwindcss": "^3.2.4" }, "devDependencies": { - "@jest/globals": "^29.1.2", "@types/lodash-es": "^4.17.5", "@types/node": "^18.0.3", "@types/qs": "^6.9.7", @@ -38,20 +36,16 @@ "@types/semver": "^7.3.13", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", - "@vitejs/plugin-legacy": "^3.0.1", "@vitejs/plugin-react-swc": "^3.0.0", "autoprefixer": "^10.4.2", "eslint": "^8.4.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^4.0.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.27.1", - "jest": "^29.1.2", "less": "^4.1.1", - "lodash": "^4.17.21", "postcss": "^8.4.5", "prettier": "2.5.1", "terser": "^5.16.1", - "ts-jest": "^29.0.3", "typescript": "^4.3.2", "vite": "^4.0.0" } diff --git a/web/src/components/DailyReviewDialog.tsx b/web/src/components/DailyReviewDialog.tsx index 3969b805..8ababb87 100644 --- a/web/src/components/DailyReviewDialog.tsx +++ b/web/src/components/DailyReviewDialog.tsx @@ -73,7 +73,7 @@ const DailyReviewDialog: React.FC = (props: Props) => { /