Skip to content

Support ESM and TS config files#137

Merged
bradlc merged 3 commits intotailwindlabs:mainfrom
juliusmarminge:new-config-formats
Mar 29, 2023
Merged

Support ESM and TS config files#137
bradlc merged 3 commits intotailwindlabs:mainfrom
juliusmarminge:new-config-formats

Conversation

@juliusmarminge
Copy link
Copy Markdown
Contributor

Fixes: #136

Not sure I'll be able to fix this but added some failing tests atleast

@juliusmarminge juliusmarminge marked this pull request as draft March 28, 2023 20:07
@juliusmarminge
Copy link
Copy Markdown
Contributor Author

juliusmarminge commented Mar 28, 2023

Not quite sure what's going on here. When using this fixed version symlinked to a project I have it works like a charm, but the tests still doesn't pass :/

Made a demo here: https://cln.sh/gbVVGw45

As seen there, <div className="sm:bg-hotpink bg-red-500"></div> formats to <div className="bg-red-500 sm:bg-hotpink"></div> perfectly fine - so it seems like the test should pass, but they dont :/

(Also the vscode plugin still complains about cannot use import ... - not sure if that uses a different version or what's going on there?)

(Also, the plugins test is now failing. I'm guessing that has to do with line-clamp-1 now being a built in class or something like that? Has the order there changed in 3.3?)

@juliusmarminge
Copy link
Copy Markdown
Contributor Author

Friendly ping @bradlc & @adamwathan, as I see you don't have CODEOWNERS here so not sure if you get notified about PRs here otherwise :)

@adamwathan
Copy link
Copy Markdown
Member

Hey! Will fix tomorrow, we generally only work during work hours 👍🏻

@bradlc
Copy link
Copy Markdown
Contributor

bradlc commented Mar 29, 2023

Thanks for making a start on this @juliusmarminge! We’ve made a couple tweaks and will get this released shortly 👍

@bradlc bradlc changed the title fix: support esm and ts config Support ESM and TS config files Mar 29, 2023
@bradlc bradlc marked this pull request as ready for review March 29, 2023 11:59
@bradlc bradlc merged commit 5cc0c7c into tailwindlabs:main Mar 29, 2023
@juliusmarminge
Copy link
Copy Markdown
Contributor Author

Thanks for making a start on this @juliusmarminge! We’ve made a couple tweaks and will get this released shortly 👍

Awesome!

@juliusmarminge juliusmarminge deleted the new-config-formats branch March 29, 2023 12:58
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* add failing tests

* fix loading esm/ts configs

* Update ESM/TS support

---------

Co-authored-by: Brad Cornes <[email protected]>
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.

Unable to format when using a typescript prettier config

3 participants