Closed
Description
Is there an existing issue for this?
- I have searched the existing issues and my issue is unique
- My issue appears in the command-line and not only in the text editor
Description Overview
The following code from shadcn/ui triggers a lint error: 'className' is missing in props validationeslint[react/prop-types)
, except this it definitely defined in the prop types.
eslint-config-next 14.1.0
└── eslint-plugin-react 7.33.2
const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => {
const id = React.useId()
return (
<FormItemContext.Provider value={{ id }}>
<div className={cn('space-y-2', className)} ref={ref} {...props} />
</FormItemContext.Provider>
)
}
)
FormItem.displayName = 'FormItem'
Expected Behavior
eslint-plugin-react version
7.33.2
eslint version
8.56.0
node version
v21.5.0