From db40efb360032de8ea8d13d07fdbe29cf78b7459 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 4 Apr 2024 10:39:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(app-desk)=20improve=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The linter was passing near the ts errors in the tests, we improve the linter by adding a ts checkup. --- src/frontend/apps/desk/package.json | 2 +- src/frontend/apps/desk/src/api/__tests__/fetchApi.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/apps/desk/package.json b/src/frontend/apps/desk/package.json index 884131d..78da5b0 100644 --- a/src/frontend/apps/desk/package.json +++ b/src/frontend/apps/desk/package.json @@ -8,7 +8,7 @@ "build:ci": "cp .env.development .env.local && yarn build", "build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes", "start": "npx -y serve@latest out", - "lint": "next lint", + "lint": "tsc --noEmit && next lint", "prettier": "prettier --write .", "stylelint": "stylelint \"**/*.css\"", "test": "jest", diff --git a/src/frontend/apps/desk/src/api/__tests__/fetchApi.test.tsx b/src/frontend/apps/desk/src/api/__tests__/fetchApi.test.tsx index 72077d6..d08d86d 100644 --- a/src/frontend/apps/desk/src/api/__tests__/fetchApi.test.tsx +++ b/src/frontend/apps/desk/src/api/__tests__/fetchApi.test.tsx @@ -43,7 +43,7 @@ describe('fetchAPI', () => { }, }); - useAuthStore.setState({ userData: { email: 'test@test.com' } }); + useAuthStore.setState({ userData: { email: 'test@test.com', id: '1234' } }); fetchMock.mock('http://some.api.url/api/v1.0/some/url', 401);