Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #12044
Closed
Open
Issue created Feb 10, 2022 by Administrator@rootContributor

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

Created by: 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.

Assignee
Assign to
Time tracking