Skip to content

Commit

Permalink
include non default dirs for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
oxdev03 committed Dec 21, 2024
1 parent 173d542 commit b8ce67f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { MongoMemoryServer } from "mongodb-memory-server";

const mongod = await MongoMemoryServer.create({
instance: {
port: 20583,
port: 20_583,
},
});

const uri = mongod.getUri();
console.log(`Database started: ${uri}`);

// eslint-disable-next-line no-undef
process.on("exit", async () => {
await mongod.stop();
console.log("[Database] Closed Connection!");
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"dev:turbo": "next dev --turbopack",
"build": "next build",
"test:server": "dotenv -v NODE_ENV=test -- next start",
"test:db": "node cypress/utils/mongodb.mjs",
"test:db": "node cypress/utils/mongodb.js",
"test:e2e": "cypress run",
"test": "start-test test:db http://example.com test:server http://localhost:3000/login test:e2e",
"test:watch": "cypress open",
"start": "next start",
"lint": "next lint",
"lint": "next lint --dir cypress server trpc types utils",
"lint:fix": "next lint --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."
Expand Down
3 changes: 2 additions & 1 deletion apps/dashboard/trpc/query-client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "@/utils/superjson-serializer";

import { defaultShouldDehydrateQuery, QueryClient } from "@tanstack/react-query";
import SuperJSON from "superjson";
import "@/utils/superjson-serializer";

export const createQueryClient = () =>
new QueryClient({
Expand Down
9 changes: 5 additions & 4 deletions apps/dashboard/trpc/react.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* eslint-disable unicorn/prefer-global-this */
"use client";

import "@/utils/superjson-serializer";

import { type QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { loggerLink, httpBatchLink } from "@trpc/client";
import { httpBatchLink, loggerLink } from "@trpc/client";
import { createTRPCReact } from "@trpc/react-query";
import { type inferRouterInputs, type inferRouterOutputs } from "@trpc/server";
import { useState } from "react";
import SuperJSON from "superjson";
import "@/utils/superjson-serializer";

import { type AppRouter } from "@/server/api/root";

Expand Down Expand Up @@ -45,9 +47,8 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
api.createClient({
links: [
loggerLink({
enabled: (op) => false &&
enabled: (op) =>
process.env.NODE_ENV === "development" || (op.direction === "down" && op.result instanceof Error),

}),
httpBatchLink({
transformer: SuperJSON,
Expand Down

0 comments on commit b8ce67f

Please sign in to comment.