Skip to content

Commit

Permalink
🔨 scripts: replace unimported with knip
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Mar 20, 2024
1 parent dd63c2f commit dd0beb0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
13 changes: 0 additions & 13 deletions .unimportedrc.json

This file was deleted.

Binary file removed bun.lockb
Binary file not shown.
9 changes: 9 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
@@ -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;
17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit dd0beb0

Please sign in to comment.