diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 407b0f862..d2f5db321 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -22,9 +22,9 @@ jobs: node-version: 20 - uses: oven-sh/setup-bun@v1 - run: bun install - - run: bun lint + - run: bun run lint - run: bun run build - - run: bun unimported + - run: bun run deps e2e: needs: [check] @@ -56,7 +56,7 @@ jobs: restore-keys: | ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - run: bun install - - run: bun build:e2e + - run: bun run build:e2e - run: bun playwright install chromium --with-deps - run: bun playwright test --project=chromium --shard ${{ matrix.shard }} - if: always() diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index c9dede882..6cf4d7826 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -20,9 +20,9 @@ jobs: node-version: 20 - uses: oven-sh/setup-bun@v1 - run: bun install - - run: bun lint + - run: bun run lint - run: bun run build - - run: bun unimported + - run: bun run deps - uses: getsentry/action-release@v1 with: environment: ${{ env.SENTRY_ENVIRONMENT }} diff --git a/.unimportedrc.json b/.unimportedrc.json deleted file mode 100644 index 5cbacc400..000000000 --- a/.unimportedrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ignoreUnresolved": ["fsevents", "electron/index.js", "i18n"], - "entry": [ - "sentry.*.config.ts", - "*.config.cjs", - "middleware.ts", - "pages/**/*", - "scripts/**/*", - "e2e/specs/**/*.spec.ts", - "i18n/index.ts" - ], - "ignoreUnimported": ["playwright.config.ts", "wagmi.config.ts"] -} diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 8c897b164..000000000 Binary files a/bun.lockb and /dev/null differ diff --git a/knip.config.ts b/knip.config.ts new file mode 100644 index 000000000..f92f14f6f --- /dev/null +++ b/knip.config.ts @@ -0,0 +1,9 @@ +import type { KnipConfig } from 'knip'; + +const config: KnipConfig = { + project: ['**/*.{ts,tsx,js,jsx,json}'], + ignoreDependencies: ['@sentry/cli', 'concurrently', 'sharp', 'ts-node'], + entry: ['wagmi.config.ts'], +}; + +export default config; diff --git a/package.json b/package.json index e379b1be8..59927c880 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ "build": "next build", "build:e2e": "DISABLE_SENTRY_PLUGIN=true NEXT_PUBLIC_NETWORK=10 NEXT_PUBLIC_IS_E2E=true next build", "start": "NODE_ENV=production next start", - "start:e2e": "bun build:e2e && NODE_ENV=production next start", + "start:e2e": "bun run build:e2e && NODE_ENV=production next start", "export": "NODE_ENV=production next export", "prepare": "wagmi generate", "lint": "eslint --max-warnings=0 .", + "deps": "knip --include dependencies,binaries,unresolved,files", "i18n:scan": "i18next-scanner --config i18next-scanner.config.cjs" }, "engines": { @@ -53,6 +54,7 @@ "react-i18next": "^13.5.0", "react-number-format": "^5.3.4", "react-plotly.js": "^2.6.0", + "react-transition-group": "^4.4.5", "recharts": "^2.12.3", "viem": "^1.21.4", "wagmi": "^1.4.13" @@ -61,11 +63,8 @@ "@next/eslint-plugin-next": "^14.1.4", "@playwright/test": "^1.42.1", "@sentry/cli": "^2.30.2", - "@typechain/ethers-v5": "^11.1.2", - "@types/chai": "^4.3.13", "@types/eslint": "^8.56.6", "@types/mixpanel-browser": "^2.49.0", - "@types/mocha": "^10.0.6", "@types/node": "^20.11.30", "@types/plotly.js": "^2.29.2", "@types/react": "^18.2.67", @@ -78,25 +77,19 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-chai-expect": "^3.0.0", - "eslint-plugin-chai-friendly": "^0.7.4", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-mocha": "^10.4.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-testing-library": "^6.2.0", - "eslint-plugin-ui-testing": "^2.0.1", "i18next-scanner": "^4.4.0", + "knip": "^5.1.5", "prettier": "^3.2.5", "sass": "^1.72.0", "sharp": "^0.33.2", - "ts-loader": "^9.5.1", "ts-node": "^10.9.2", - "typescript": "^5.4.2", - "unimported": "^1.31.0" + "typescript": "^5.4.2" }, "trustedDependencies": [ "@exactly/lib",