Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tailwind config file resolution when Prettier config file is not present #62

Merged
merged 3 commits into from Feb 24, 2022

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
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.

None yet

1 participant