tailwindlabs / tailwindcss-forms

A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
https://tailwindcss-forms.vercel.app
MIT License
4.15k stars 219 forks source link

Readme: Remove -D from install #130

Closed AnnsAnns closed 1 year ago

AnnsAnns commented 1 year ago

TailwindCSS warns you that you shouldn't install tailwindcss-forms as a dev dependency when trying to add it to your tailwind config.

This simple MR simply removes the -D flag from the install command within the readme to not confuse people installing it as a dev dependency by accident.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tailwindcss-forms ✅ Ready (Inspect) Visit Preview Dec 8, 2022 at 3:44PM (UTC)
reinink commented 1 year ago

@tumGER Hey! So this doesn't sound right — you can definitely install the @tailwindcss/forms plugin as a dev dependency if you want. Where are you seeing this warning?

reinink commented 1 year ago

Hey! Going to close this PR since I haven't heard back from you, and because it's definitely possible to install the @tailwindcss/forms plugin as a dev dependency. Would still love to know where you saw this warning though — so feel free to still leave that as a comment 👍

AnnsAnns commented 1 year ago

Hey, sorry for not responding.

I'm getting this error/warning: '@tailwindcss/forms' should be listed in the project's dependencies, not devDependencies when including it in the plugins under tailwind.config.cjs.

 plugins: [
        // eslint-disable-next-line global-require
        require('@headlessui/tailwindcss'),
        // eslint-disable-next-line global-require
        require('@tailwindcss/forms'),  // <- Error Line
    ]
reinink commented 1 year ago

@tumGER Hey! So we're definitely not the ones throwing this error — it appears to be an eslint warning. You can update your eslint configuration to hide this. See here for more information:

https://stackoverflow.com/questions/44939304/eslint-should-be-listed-in-the-projects-dependencies-not-devdependencies

Hope that helps 👍