Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: redundant empty Interface for InputProps on input component #4083

Open
2 tasks done
argcast opened this issue Jun 23, 2024 · 0 comments · May be fixed by #4082
Open
2 tasks done

[bug]: redundant empty Interface for InputProps on input component #4083

argcast opened this issue Jun 23, 2024 · 0 comments · May be fixed by #4082
Labels
bug Something isn't working

Comments

@argcast
Copy link

argcast commented Jun 23, 2024

Describe the bug

The issue in the code is due to the InputProps interface extending React.InputHTMLAttributes<HTMLInputElement> without adding any new members.

This is flagged by the ESLint rule @typescript-eslint/no-empty-interface, which indicates that an interface declaring no members is equivalent to its supertype. Essentially, InputProps does not add any value beyond what React.InputHTMLAttributes<HTMLInputElement> already provides.

Proposed fix on #4082

Affected component/components

Input

How to reproduce

  1. Create a new project using Next.js
  2. Add input component
  3. Build project

Codesandbox/StackBlitz link

No response

Logs

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

System Info

No relevant information.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@argcast argcast added the bug Something isn't working label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant