Description
Describe the bug
After installing CRA5, prettier started reporting errors for class names which aren't sorted. Upon inspection, I found this to be caused by the install of prettier-plugin-tailwindcss. This lib is undesirable as it alters the default Prettier config, and because it's installed as a plugin unconfigurable.
In addition, this library is unlicensed, so using it is suspicious legally.
In addition, this library is uglified, so its published code can hardly be reviewed and may be harmful.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
I searched the entire repo for mentions of the plugin, and did not find anything relevant.
Environment
Environment Info:
current version of create-react-app: 5.0.0
running from /Users/martijnhols/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System:
OS: macOS 11.6.2
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
Yarn: 1.22.17 - ~/.yarn/bin/yarn
npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
Browsers:
Chrome: 98.0.4758.80
Edge: Not Found
Firefox: 88.0
Safari: 15.2
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: ^5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
- Install CRA 5
- install
prettier
- Write any kind of code with classNames e.g.
table table-condensed
which is already sorted as desired - find prettier to complain about the className order while it works fine in CRA4 or any project with standard prettier
Expected behavior
I would expect CRA5 not to alter default Prettier config.
Actual behavior
The prettier-plugin-tailwindcss
plugin is installed and alters Prettier config.
Activity
Remove tailwindcss dependency
Move tailwindcss to optional peer dependencies
Move tailwindcss to optional peer dependencies