ui
ui copied to clipboard
Input component's InputProps interface gives no-empty-interface ESLint error
Hi! I have a NextJS project using TypeScript, and I just installed the Input component. ESLint flags the following line of the generated input.tsx component:
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
With the following error: "An interface declaring no members is equivalent to its supertype." As the error message states, the InputProps interface has no members, which is causing the problem.
**Steps to Reproduce: **
- Install shadcn with all the default options suggested by the installer.
- Run
npx shadcn-ui@latest add input
- See the ESLint error on the InputProps interface inside the generated Input component
I'm using npm as my package manager, if it helps. Thanks!
I have the same error for textArea component.
Same for TextArea - Even though they improve readability, it would be better to strip these off to avoid these issues. This errors breaks Vercel's build.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
I don't think this should be closed - this issue causes errors on deploying into Vercel (Next 14 - App Router - t3 stack). There should be at least a solution proposed for this (either bypassing Vercel or not causing it at all).
Agreed, still got this issue
This is still an issue shound't be closed yet
Still happening.
Failed to compile.
./src/components/ui/input.tsx
5:18 Error: An interface declaring no members is equivalent to its supertype. @typescript-eslint/no-empty-interface
Replacing the empty interface with this snippet works for me.
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>
Same error.
I am getting the same issue and I feel it should be fixed ASAP