prettier-plugin-tailwindcss
Version:
A Prettier plugin for sorting Tailwind CSS classes.
41 lines (37 loc) • 1.14 kB
TypeScript
import { SupportOption, Printer, Parser } from 'prettier';
declare const options: Record<string, SupportOption>;
declare const printers: Record<string, Printer>;
declare const parsers: Record<string, Parser>;
interface PluginOptions {
/**
* Path to the Tailwind config file.
*/
tailwindConfig?: string;
/**
* Path to the CSS stylesheet used by Tailwind CSS (v4+)
*/
tailwindStylesheet?: string;
/**
* Path to the CSS stylesheet used by Tailwind CSS (v4+)
*
* @deprecated Use `tailwindStylesheet` instead
*/
tailwindEntryPoint?: string;
/**
* List of custom function and tag names that contain classes.
*/
tailwindFunctions?: string[];
/**
* List of custom attributes that contain classes.
*/
tailwindAttributes?: string[];
/**
* Preserve whitespace around Tailwind classes when sorting.
*/
tailwindPreserveWhitespace?: boolean;
/**
* Preserve duplicate classes inside a class list when sorting.
*/
tailwindPreserveDuplicates?: boolean;
}
export { type PluginOptions, options, parsers, printers };