UNPKG

eslint-plugin-readable-tailwind

Version:

auto-wraps tailwind classes after a certain print width or class count into multiple lines to improve readability.

15 lines 620 B
import { findTailwindConfig } from "./config.js"; import { createTailwindContextFromConfigFile } from "./context.js"; export async function getClassOrder({ classes, configPath, cwd }) { const warnings = []; const config = findTailwindConfig(cwd, configPath); if (!config) { warnings.push({ option: "entryPoint", title: `No tailwind css config found at \`${configPath}\`` }); } const context = createTailwindContextFromConfigFile(config?.path, config?.invalidate); return [context.getClassOrder(classes), warnings]; } //# sourceMappingURL=class-order.js.map