shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
68.57k stars 4.06k forks source link

[bug]: Eslint unknown property 'cmdk-input-wrapper' #3366

Open darrenswhite opened 5 months ago

darrenswhite commented 5 months ago

Describe the bug

The generated code for the Command component contains a data attribute cmdk-input-wrapper (presumably used for styling?). ESLint complains about this unknown attribute.

image

Affected component/components

Command

How to reproduce

  1. Add command component npx shadcn-ui@latest add command.
  2. Run ESLint (with plugin:react/recommended).

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

No need to provide this

Before submitting

aleciavogel commented 3 months ago

I think this is an angular property and we should be using react-cmdk instead of just cmdk. However, it's going to require a bunch of refactoring because of course they don't have the same exports 😭

In the meantime, probably just eslintignore these two properties with:

// eslint-disable-next-line react/no-unknown-property -- temp fix while using wrong cmdk package
w3bh4ck commented 2 months ago

Use this instead: data-cmdk-input-wrapper=''