version: dprint 0.52.0
oxfmt doesn't implement Tailwind CSS class sorting in Rust. Instead, it has an external callback for prettier-plugin-tailwindcss which calls into a JS runtime to invoke tailwindcss.getClassOrder. The WASM plugin has no JS runtime available, so it cannot provide the TailwindCallback that oxc_formatter requires via ExternalCallbacks. As a result, oxc's formatter.build passes None for external callbacks, and Tailwind CSS classes are never sorted.
Either adding a JS runtime in the plugin to call prettier's sorter or rewriting sorting logic in Rust would solve this.
version:
dprint 0.52.0oxfmtdoesn't implement Tailwind CSS class sorting in Rust. Instead, it has an external callback forprettier-plugin-tailwindcsswhich calls into a JS runtime to invoketailwindcss.getClassOrder. The WASM plugin has no JS runtime available, so it cannot provide theTailwindCallbackthatoxc_formatterrequires viaExternalCallbacks. As a result, oxc'sformatter.buildpassesNonefor external callbacks, and Tailwind CSS classes are never sorted.Either adding a JS runtime in the plugin to call prettier's sorter or rewriting sorting logic in Rust would solve this.