Skip to content

Commit bba400a

Browse files
authored
Merge pull request #507 from DelegoLabs/chore/ci-tests-pass
fix(lint): resolve all eslint warnings
2 parents 9904109 + eec7488 commit bba400a

6 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
packages: read
11+
contents: read
12+
913
concurrency:
1014
group: ci-${{ github.workflow }}-${{ github.ref }}
1115
cancel-in-progress: true
@@ -38,7 +42,7 @@ jobs:
3842
- name: Install dependencies
3943
run: pnpm install --frozen-lockfile
4044
env:
41-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
4246

4347
- name: Run linter
4448
run: pnpm lint
@@ -65,7 +69,7 @@ jobs:
6569
- name: Install dependencies
6670
run: pnpm install --frozen-lockfile
6771
env:
68-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
6973

7074
- name: Build shared packages
7175
run: pnpm --filter "./packages/*" --filter "./apps/frontend" build
@@ -96,7 +100,7 @@ jobs:
96100
- name: Install dependencies
97101
run: pnpm install --frozen-lockfile
98102
env:
99-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
100104

101105
- name: Build shared packages
102106
run: pnpm --filter "./packages/*" --filter "./apps/frontend" build
@@ -127,7 +131,7 @@ jobs:
127131
- name: Install dependencies
128132
run: pnpm install --frozen-lockfile
129133
env:
130-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
131135

132136
- name: Build project
133137
run: pnpm build
@@ -154,7 +158,7 @@ jobs:
154158
- name: Install dependencies
155159
run: pnpm install --frozen-lockfile
156160
env:
157-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
158162

159163
- name: Run audit
160164
run: pnpm audit --prod --audit-level=high

apps/frontend/components/delegations/DelegationQR.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import { describe, it, expect, vi, beforeEach } from "vitest";
33
import { render, screen, waitFor } from "@testing-library/react";
4-
import userEvent from "@testing-library/user-event";
54
import { DelegationQR } from "./DelegationQR";
65

76
vi.mock("qrcode", () => ({

apps/frontend/components/delegations/DelegationQR.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export function DelegationQR({
124124
Delegation QR Code
125125
</h3>
126126
{qrDataUrl && (
127+
// eslint-disable-next-line @next/next/no-img-element -- QR code is a data URL; next/image optimization is unnecessary
127128
<img
128129
src={qrDataUrl}
129130
alt="Delegation QR Code"

apps/frontend/components/onboarding/OnboardingStep.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use client";
22

3-
import { useState } from "react";
43
import { Card, Button } from "@delegolabs/ui";
54

65
export interface OnboardingStepProps {

apps/frontend/hooks/useDelegations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export function useDelegations(): UseDelegationsResult {
165165
return null;
166166
}
167167
},
168-
[]
168+
[setPending]
169169
);
170170

171171
const updateDelegation = useCallback(
@@ -205,7 +205,7 @@ export function useDelegations(): UseDelegationsResult {
205205
return null;
206206
}
207207
},
208-
[delegations]
208+
[delegations, setPending]
209209
);
210210

211211
const revokeDelegation = useCallback(
@@ -231,7 +231,7 @@ export function useDelegations(): UseDelegationsResult {
231231
return false;
232232
}
233233
},
234-
[delegations]
234+
[delegations, setPending]
235235
);
236236

237237
useEffect(() => {

apps/frontend/tests/EscrowCard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect, vi, beforeEach } from "vitest";
1+
import { describe, it, expect } from "vitest";
22
import { render, screen } from "@testing-library/react";
33
import { EscrowCard } from "../components/escrows/EscrowCard";
44
import type { Escrow } from "@delegolabs/types";

0 commit comments

Comments
 (0)