🚨(app-desk) improve linter

The linter was passing near the ts errors in
the tests, we improve the linter by adding
a ts checkup.
This commit is contained in:
Anthony LC
2024-04-04 17:07:18 +02:00
committed by Anthony LC
parent 603ece466d
commit 409691d466
5 changed files with 8 additions and 3 deletions

View File

@@ -33,4 +33,3 @@ yarn-error.log*
# typescript # typescript
*.tsbuildinfo *.tsbuildinfo
next-env.d.ts

View File

@@ -0,0 +1 @@
next-env.d.ts

View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -8,7 +8,7 @@
"build:ci": "cp .env.development .env.local && yarn build", "build:ci": "cp .env.development .env.local && yarn build",
"build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes", "build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes",
"start": "npx -y serve@latest out", "start": "npx -y serve@latest out",
"lint": "next lint", "lint": "tsc --noEmit && next lint",
"prettier": "prettier --write .", "prettier": "prettier --write .",
"stylelint": "stylelint \"**/*.css\"", "stylelint": "stylelint \"**/*.css\"",
"test": "jest", "test": "jest",

View File

@@ -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); fetchMock.mock('http://some.api.url/api/v1.0/some/url', 401);