eslint-plugin-readable-tailwind
Version:
auto-wraps tailwind classes after a certain print width or class count into multiple lines to improve readability.
19 lines • 569 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldInvalidate = shouldInvalidate;
const node_fs_1 = require("node:fs");
const CACHE = new Map();
function shouldInvalidate(path) {
const stat = (0, node_fs_1.statSync)(path);
if (!(0, node_fs_1.existsSync)(path) || !stat.isFile()) {
CACHE.delete(path);
return;
}
const invalidate = stat.mtimeMs > (CACHE.get(path) ?? 0);
CACHE.set(path, stat.mtimeMs);
return {
invalidate,
path
};
}
//# sourceMappingURL=invalidate.js.map