Skip to content

Incompatible with import-sorting plugins #112

@notpeelz

Description

@notpeelz

Bug description

I've followed the compatibility recommendations, but I can't get this plugin to work with any import-sorting plugins.
I've tested it with prettier-plugin-organize-imports, @trivago/prettier-plugin-sort-imports and prettier-plugin-import-sort.
They work when tested in isolation, but never together (only the plugin listed last works).

Versions

  • prettier-plugin-tailwindcss: 0.2.1
  • tailwindcss: 3.2.4
  • package manager: Yarn 3.3.1 (berry) with PnP enabled
System:
  OS: Linux 5.15 Debian GNU/Linux bookworm/sid
  CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
  Memory: 11.24 GB / 15.58 GB
  Container: Yes
  Shell: 5.9 - /usr/bin/zsh
Binaries:
  Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
  Yarn: 3.3.1 - ~/.nvm/versions/node/v18.12.1/bin/yarn
  npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm

Reproduction

https://github.com/notpeelz/bug-repro-prettier-tw-sort-imports (see src/test.tsx)

All the dependencies are checked in the repository (using Yarn PnP/zero-installs), so you should be able to test without running any commands.

Make sure you let VS Code use the workspace install of typescript:

  1. Press ctrl+shift+p in a TypeScript file
  2. Choose "Select TypeScript Version"
  3. Pick "Use Workspace Version"

I did my tests through VS Code using these extensions:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions