eslint-plugin-better-tailwindcss
Version:
auto-wraps tailwind classes after a certain print width or class count into multiple lines to improve readability.
15 lines • 662 B
JavaScript
import { resolve } from "node:path";
import { createSyncFn } from "synckit";
import { getWorkerOptions } from "../async-utils/worker.js";
export let getPrefix = () => { throw new Error("getPrefix() called before being initialized"); };
export function createGetPrefix(ctx) {
const workerPath = getWorkerPath(ctx);
const workerOptions = getWorkerOptions();
const runWorker = createSyncFn(workerPath, workerOptions);
getPrefix = ctx => runWorker("getPrefix", ctx);
return getPrefix;
}
function getWorkerPath(ctx) {
return resolve(import.meta.dirname, `./tailwind.async.worker.v${ctx.version.major}.js`);
}
//# sourceMappingURL=prefix.js.map