Skip to content

Add support for formatting .marko files#151

Merged
thecrypticace merged 12 commits intotailwindlabs:mainfrom
AngusMorton:marko-support
May 1, 2023
Merged

Add support for formatting .marko files#151
thecrypticace merged 12 commits intotailwindlabs:mainfrom
AngusMorton:marko-support

Conversation

@AngusMorton
Copy link
Copy Markdown
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!

Comment thread src/index.js
@thecrypticace thecrypticace self-assigned this Apr 27, 2023
@thecrypticace thecrypticace merged commit fcbe554 into tailwindlabs:main May 1, 2023
@thecrypticace
Copy link
Copy Markdown
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 <[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.

3 participants