Skip to content

CRA 5 installs prettier-plugin-tailwindcss which changes prettier behavior to sort classNames (also it's unlicensed) #12044

Open
@MartijnHols

Description

@MartijnHols

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

  1. Install CRA 5
  2. install prettier
  3. Write any kind of code with classNames e.g. table table-condensed which is already sorted as desired
  4. 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

added a commit that references this issue on Feb 10, 2022
21dcf73
added 2 commits that reference this issue on Feb 10, 2022
0b256f2
763745b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @MartijnHols

      Issue actions

        CRA 5 installs prettier-plugin-tailwindcss which changes prettier behavior to sort classNames (also it's unlicensed) · Issue #12044 · facebook/create-react-app