fix(lint): enable import/first, promise await style, and require-await #5
portal-ci.yml
on: push
Annotations
11 errors and 4 warnings
|
Lint
Process completed with exit code 1.
|
|
Type Check
Process completed with exit code 2.
|
|
Type Check
@atl/portal#type-check: command (/home/runner/work/monorepo/monorepo/apps/portal) /home/runner/setup-pnpm/node_modules/.bin/pnpm run type-check exited (2)
|
|
Type Check
Expected 1 arguments, but got 0.
|
|
Test
Process completed with exit code 1.
|
|
tests/app/api/user/me/route.test.ts:
apps/portal/tests/app/api/user/me/route.test.ts#L1
Error: [vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock
❯ tests/app/api/user/me/route.test.ts:1:1
Caused by: Caused by: Error: Failed to resolve import "@/auth" from "packages/api/src/utils.ts". Does the file exist?
Plugin: vite:import-analysis
File: /home/runner/work/monorepo/monorepo/apps/portal/packages/api/src/utils.ts:13:21
3 | import { z } from "zod";
4 | import { fromError, isZodErrorLike } from "zod-validation-error";
5 | import { auth } from "@/auth";
| ^
6 | import { isAdmin, isAdminOrStaff } from "@/auth/check-role";
7 | export async function requireAdminOrStaff(request) {
❯ TransformPluginContext._formatLog ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28999:43
❯ TransformPluginContext.error ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28996:14
❯ normalizeUrl ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27119:18
❯ ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27177:32
❯ TransformPluginContext.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27145:4
❯ EnvironmentPluginContainer.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28797:14
❯ loadAndTransform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:22670:26
❯ fetchModule ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:33993:15
|
|
tests/app/api/bridge/identity/route.test.ts:
apps/portal/src/app/api/bridge/identity/route.ts#L1
Error: [vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock
❯ src/app/api/bridge/identity/route.ts:1:1
Caused by: Caused by: Error: Failed to resolve import "@/auth" from "packages/api/src/utils.ts". Does the file exist?
Plugin: vite:import-analysis
File: /home/runner/work/monorepo/monorepo/apps/portal/packages/api/src/utils.ts:13:21
3 | import { z } from "zod";
4 | import { fromError, isZodErrorLike } from "zod-validation-error";
5 | import { auth } from "@/auth";
| ^
6 | import { isAdmin, isAdminOrStaff } from "@/auth/check-role";
7 | export async function requireAdminOrStaff(request) {
❯ TransformPluginContext._formatLog ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28999:43
❯ TransformPluginContext.error ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28996:14
❯ normalizeUrl ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27119:18
❯ ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27177:32
❯ TransformPluginContext.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27145:4
❯ EnvironmentPluginContainer.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28797:14
❯ loadAndTransform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:22670:26
|
|
tests/app/api/admin/irc-accounts/route.test.ts:
apps/portal/src/app/api/admin/irc-accounts/route.ts#L1
Error: [vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock
❯ src/app/api/admin/irc-accounts/route.ts:1:1
Caused by: Caused by: Error: Failed to resolve import "@/auth" from "packages/api/src/utils.ts". Does the file exist?
Plugin: vite:import-analysis
File: /home/runner/work/monorepo/monorepo/apps/portal/packages/api/src/utils.ts:13:21
3 | import { z } from "zod";
4 | import { fromError, isZodErrorLike } from "zod-validation-error";
5 | import { auth } from "@/auth";
| ^
6 | import { isAdmin, isAdminOrStaff } from "@/auth/check-role";
7 | export async function requireAdminOrStaff(request) {
❯ TransformPluginContext._formatLog ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28999:43
❯ TransformPluginContext.error ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28996:14
❯ normalizeUrl ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27119:18
❯ ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27177:32
❯ TransformPluginContext.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:27145:4
❯ EnvironmentPluginContainer.transform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:28797:14
❯ loadAndTransform ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:22670:26
❯ fetchModule ../../node_modules/.pnpm/vite@7.3.1_@types+node@25.5.0_jiti@2.6.1_lightningcss@1.32.0_terser@5.46.1_tsx@4.21.0_yaml@2.8.3/node_modules/vite/dist/node/chunks/config.js:33993:15
|
|
tests/monorepo/monorepo-correctness.test.ts > Property 2: No stale imports remain > property: random source files contain no stale import patterns:
apps/portal/tests/monorepo/monorepo-correctness.test.ts#L287
Error: Property failed after 2 tests
{ seed: -255362359, path: "1:0", endOnFailure: true }
Counterexample: ["/home/runner/work/monorepo/monorepo/apps/portal/src/app/(dashboard)/app/(overview)/page.tsx"]
Shrunk 1 time(s)
Hint: Enable verbose mode in order to have the list of all failing values encountered during the run
❯ buildError ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2434:16
❯ throwIfFailed ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2441:8
❯ reportRunDetails ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2457:14
❯ Module.assert ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2514:7
❯ tests/monorepo/monorepo-correctness.test.ts:287:8
Caused by: Caused by: Error: Property failed by returning false
❯ Property.run ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:1299:66
❯ runIt ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2477:24
❯ check ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2509:204
❯ Module.assert ../../node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2512:14
❯ tests/monorepo/monorepo-correctness.test.ts:287:8
|
|
tests/monorepo/monorepo-correctness.test.ts > Property 2: No stale imports remain > no source file contains stale @/shared/*, @/components/*, @/db, or @/ui/* imports:
apps/portal/tests/monorepo/monorepo-correctness.test.ts#L278
AssertionError: Found 17 stale import(s):
src/app/(dashboard)/app/(overview)/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/admin/layout.tsx: import { PageContent } from "@/components/layout/page";
src/app/(dashboard)/app/admin/sessions/page.tsx: import { PageHeader } from "@/components/layout/page/page-header";
src/app/(dashboard)/app/admin/users/page.tsx: import { PageHeader } from "@/components/layout/page/page-header";
src/app/(dashboard)/app/changelog/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/connect/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/donate/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/feed/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/integrations/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/layout.tsx: import { AppLayout } from "@/components/layout/app-layout";
src/app/(dashboard)/app/loading.tsx: import { PageContent } from "@/components/layout/page";
src/app/(dashboard)/app/mail/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/(dashboard)/app/settings/page.tsx: import { PageContent, PageHeader } from "@/components/layout/page";
src/app/layout.tsx: import { DevTools } from "@/components/dev-tools";
src/app/providers.tsx: import { CommandMenu } from "@/components/command-menu";
src/app/providers.tsx: import { ReactQueryDevtools } from "@/components/dev-tools";
src/features/admin/components/admin-dashboard-overview.tsx: import { PageHeader } from "@/components/layout/page/page-header";: expected [ { …(3) }, { …(3) }, { …(3) }, …(14) ] to have a length of +0 but got 17
- Expected
+ Received
- 0
+ 17
❯ tests/monorepo/monorepo-correctness.test.ts:278:7
|
|
Test
@atl/portal#test:coverage: command (/home/runner/work/monorepo/monorepo/apps/portal) /home/runner/setup-pnpm/node_modules/.bin/pnpm run test:coverage exited (1)
|
|
Lint
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Type Check
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea, pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Build
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|