[ci] yarn format

This commit is contained in:
matthewp 2021-11-19 20:26:02 +00:00 committed by GitHub Actions
parent a0d4d99a9a
commit 16d972fe46

View file

@ -31,7 +31,8 @@ const isBuildableLink = (node: parse5.Element, srcRoot: string, srcRootWeb: stri
if (typeof href !== 'string' || !href.length) return false;
return href.startsWith(srcRoot) || href.startsWith(srcRootWeb) || `/${href}`.startsWith(srcRoot); // Windows fix: some paths are missing leading "/"
};
const isBuildableImage = (node: parse5.Element, srcRoot: string, srcRootWeb: string) => getTagName(node) === 'img' && (getAttribute(node, 'src')?.startsWith(srcRoot) || getAttribute(node, 'src')?.startsWith(srcRootWeb));
const isBuildableImage = (node: parse5.Element, srcRoot: string, srcRootWeb: string) =>
getTagName(node) === 'img' && (getAttribute(node, 'src')?.startsWith(srcRoot) || getAttribute(node, 'src')?.startsWith(srcRootWeb));
const hasSrcSet = (node: parse5.Element) => tagsWithSrcSet.has(getTagName(node)) && !!getAttribute(node, 'srcset');
const isHoistedScript = (node: parse5.Element) => getTagName(node) === 'script' && hasAttribute(node, 'hoist');