Skip to content

Conversation

@bradlc
Copy link
Contributor

@bradlc bradlc commented Feb 24, 2022

This PR fixes Tailwind config file resolution when no Prettier config file is present. Now, when the tailwindConfig option is not provided the plugin will search up the directory hierarchy from a "base" directory, looking for a config file. The base directory is determined in this order:

  1. The directory containing the Prettier config file if there is one
  2. The directory containing the current file (options.filepath), if provided
  3. The current working directory (process.cwd())

Additionally, the VSCODE_CWD environment variable is no longer used because its value is not necessarily equal to the directory that is currently open in VS Code, as originally thought.

@bradlc bradlc merged commit 190be16 into main Feb 24, 2022
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
…present (tailwindlabs#62)

* Update config file resolution

* Add "no prettier config" test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants