JoshuaKGoldberg
JoshuaKGoldberg
TTCTheo's Typesafe Cult
Created by couincouin007 on 12/8/2023 in #questions
Conflict between shadcn/ui components and @typescript-eslint/no-empty-interface
As for @typescript-eslint/consistent-type-imports, https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how has more context on that. If you don't personally care about keeping consistent import styles and your project doesn't have a technical reason to care, then you can always disable the rule. Or just let it auto-fix to be consistent. Either way - totally up to you. There's no single "best practice" beyond being consistent within your project.
6 replies
TTCTheo's Typesafe Cult
Created by couincouin007 on 12/8/2023 in #questions
Conflict between shadcn/ui components and @typescript-eslint/no-empty-interface
In the case of interface MyProps extends SomeBaseProps {}, a couple of alternatives you might like are: * Using SomeBaseProps directly * type MyProps = SomeBaseProps * Disabling the @typescript-eslint/no-empty-interface rule altogether ...but it's really up to however you want to work in your project.
6 replies
TTCTheo's Typesafe Cult
Created by couincouin007 on 12/8/2023 in #questions
Conflict between shadcn/ui components and @typescript-eslint/no-empty-interface
Hey @couincouin007 sorry for the delay, didn't see this till now - what you did is a good and reasonable solution. Lint rules are just tools you can configure for your needs. The out-of-the-box config is a starter template you can adjust to your needs.
6 replies
TTCTheo's Typesafe Cult
Created by BinarySenseiii on 5/25/2023 in #questions
how to fix next auth ts error?
This is a typescript-eslint complaint (so, the linter, not TypeScript itself). Have you tried reading the docs linked by the complaint to understand why it's unhappy? https://typescript-eslint.io/rules/no-misused-promises/
5 replies