Elite
Elite
TTCTheo's Typesafe Cult
Created by Elite on 6/24/2024 in #questions
instant updates from route handler to frontend
So I have a webhook server that lets me know when a PayPal invoice has been paid. And I have a dynamic route (/transaction/{id}) I want to immediately change my frontend when this invoice gets paid on the correlating id. Rn I have a use state that checks for transaction status changes in mongodb. So since the webhook runs on a route handler, I’m able to update the transaction’s state in mongodb, but Im not able to let the frontend use effect know that it’s been updating. I don’t really want to poll as I want this flow to be as instant as possible, the user pays invoice in PayPal, frontend changes. How could I do this?
54 replies
TTCTheo's Typesafe Cult
Created by Elite on 5/6/2024 in #questions
nextjs cache questions with new react news
with the new react fetch stuff, if I want to use NextJS unstable_cache, do I need to also wrap a React.cache over it?
4 replies
TTCTheo's Typesafe Cult
Created by Elite on 5/6/2024 in #questions
change typescript version in workspace to have typesafety for nextjs (const dynamic =)
how can I change the typescript version in my workspace to have typesafety for nextjs (const dynamic =)? I tried searching change ts version but use the workspace option doesn't exist. Do i need to be in a ts file?
5 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/27/2024 in #questions
permanent and secure state storage
so for my app im checking if a user has paid a paypal invoice. on the frontend I display a few buttons (so once they pay it, they click a button) I basically time it so in 180 seconds the user has to pay it or it gets cancelled. but the first 180 sec, they get a button that resets the time and lets them do it again without filling in a form. im wondering how I can store the state of such things permanently (they can't reload the page to reset timers or whatever) I was thinking local storage but users could edit the numebr of times they've clicked hte button to check (thats a state var)
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/25/2024 in #questions
does react ssr now?
Might be a stupid question but does react have SSR now with the introduction of server and client components?
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
invalid env variables
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
42 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
how do i get the vercel bot to comment on prs?
how do i get the vercel bot to comment on prs? Not sure why but it doesn't seem to do it on default
7 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
invalid env variable error with drizzle and neondb
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/21/2024 in #questions
invalid env vars with drizzle and neondb
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
7 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/21/2024 in #questions
server dir with nextjs and drizzle
So Im configuring a drizzle and nextjs app router application In the server directory, my env keys dont work unless i add:
import {config} from 'dotenv';

config ({
path: '.env',
});
import {config} from 'dotenv';

config ({
path: '.env',
});
is there a reason for this? i thought I jsut need to do process.env.VALUE (works in api routes)
4 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/31/2023 in #questions
shadcn ui help
hi so i used a template for my landing page, then i manually installed shadcn ui. i'm trying to use the popover on it: i get this look https://media.discordapp.net/attachments/1166165842942242906/1166165843412009011/image.png?ex=65497f93&is=65370a93&hm=84c517c0be1cedfc47a0cde9e43f3fb80852b2c1aedf4af88965b99c93b14f8a& my code: popover.tsx:
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
Globals.css: https://gist.github.com/navincodesalot/4d4b6273511a903c13ba9cdf52d44779 Components.json: https://gist.github.com/navincodesalot/b7fdbf882d824475e5fc90a2915dbe83 Tailwind.config.js: https://gist.github.com/navincodesalot/4de9deda69be629e149c3206314854a3
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/24/2023 in #questions
shadcn ui help
hi so i used a template for my landing page, then i manually installed shadcn ui. i'm trying to use the popover on it: i get this look https://media.discordapp.net/attachments/1166165842942242906/1166165843412009011/image.png?ex=65497f93&is=65370a93&hm=84c517c0be1cedfc47a0cde9e43f3fb80852b2c1aedf4af88965b99c93b14f8a& my code: popover.tsx:
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
Globals.css: https://gist.github.com/navincodesalot/4d4b6273511a903c13ba9cdf52d44779 Components.json: https://gist.github.com/navincodesalot/b7fdbf882d824475e5fc90a2915dbe83 Tailwind.config.js: https://gist.github.com/navincodesalot/4de9deda69be629e149c3206314854a3
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/24/2023 in #questions
shadcn ui - css scuffed
No description
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/10/2023 in #questions
type errors even after disabling
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
1 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/8/2023 in #questions
type errors even after disabling
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/7/2023 in #questions
type errors i wanna change to warn
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/4/2023 in #questions
add on to the file object
without changing the type of UploadedFile, can i add a field to the file object so my frontend can read it after a file is uploaded
6 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/2/2023 in #questions
uploadthing/react not showing up or smth
5 replies
TTCTheo's Typesafe Cult
Created by Elite on 7/29/2023 in #questions
problem with slugs
4 replies
TTCTheo's Typesafe Cult
Created by Elite on 6/6/2023 in #questions
use a skeleton when rendering a component
was wondering if i could add a skeleton for my navbar client component that is in my layout.tsx not sure how to do this
8 replies