jsr-exports-lint
Version:
JSR exports field lint for bundlers
21 lines (19 loc) • 445 B
JavaScript
import { lint } from "./lint-B6ddNLyQ.js";
//#region src/tsdown.ts
/**
* Lint `exports` field of JSR manifest file for tsdown hooks
* @param jsrPath The path to the `jsr.json` file.
* @returns A tsdown hook
*/
function lintJsrExports(jsrPath) {
return async (ctx) => {
await lint({
jsrPath,
entries: ctx.options.entry,
cwd: ctx.options.cwd,
silent: ctx.options.silent ?? false
});
};
}
//#endregion
export { lintJsrExports };