Skip to content

Add support for formatting .marko files #151

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

Merged
merged 12 commits into from
May 1, 2023
Merged

Add support for formatting .marko files #151

merged 12 commits into from
May 1, 2023

Conversation

AngusMorton
Copy link
Contributor

Currently, prettier-plugin-tailwind doesn't work with .marko files because Marko has its own syntax. This PR adds support for Marko using prettier-plugin-marko.

I got all the Marko tests passing locally, but I'm getting a few unrelated test failures locally on Windows, even on main, with no changes:

  • formatFixture tests.
  • Vue <div :class=\"inline sm:block flex${someVar}\"></div> test.

Let me know if I can do anything to help get this in.

Thanks!

@thecrypticace thecrypticace self-assigned this Apr 27, 2023
@thecrypticace thecrypticace merged commit fcbe554 into tailwindlabs:main May 1, 2023
@thecrypticace
Copy link
Contributor

Thanks @AngusMorton! This will be available in the next tagged release — that may or may not be this week though. In the meantime it's available to test via our insiders build:
npm install prettier-plugin-tailwindcss@insiders

bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Add Marko support

* Don't sort ArrayExpressions, only sort StringLiterals within them

* simplify

* Simplify tests

* Add peer dep for marko

This makes sure pnpm and Yarn PnP don’t complain

* Add dev dep for marko translator

It’s required for the plugin to work

* update lockfile

* Update changelog

* Simplify

* Fix CS

* Update lockfile

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
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.

3 participants