heybourn / headwind

An opinionated Tailwind CSS class sorter built for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
MIT License
1.39k stars 45 forks source link

Extension runs even when no tailwind.config.js is present #81

Open bbugh opened 4 years ago

bbugh commented 4 years ago

Describe the bug

Hi 👋 thanks for this great extension, it's been very useful for Tailwind (and I wish there was a real Bootstrap equivalent).

Unfortunately, I have a project that uses Bootstrap, and despite there being no tailwind.config.js present, this extension still runs and sorts my Bootstrap css. There is also no tailwind dependency in my package.json or yarn.lock. The README says:

Headwind works globally once installed and will run on save if a tailwind.config.js file is present within your working directory.

image

Before save:

<ul class="navbar-nav ml-auto">

After save:

<ul class="ml-auto navbar-nav">

To Reproduce Steps to reproduce the behavior:

  1. Run this extension in a project with no tailwind
  2. Observe that CSS classes that resemble Tailwind classes are still changed

Expected behavior

Non-tailwind projects should not have their classes sorted.

dakshshah96 commented 4 years ago

Can confirm this. Happens to me when I'm working with Vuetify as well.

Evertt commented 3 years ago

I'm having the opposite problem. For me it doesn't sort my classes, but I want it too. I don't have a tailwind.config.js, but I do have a tailwind.config.cjs file.

Juanescacha commented 1 year ago

I'm having the opposite problem. For me it doesn't sort my classes, but I want it too. I don't have a tailwind.config.js, but I do have a tailwind.config.cjs file.

Having the same issue, Want to sort on save, but the file I have is tailwind.config.cjs and doesnt work