apply lint save to jsxA11yAnchorHasContent
MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxA11yAnchorHasContent.ts
packages/@romejs/js-compiler/lint/rules/react/jsxA11yAnchorHasContent.ts
import {Path, TransformExitResult} from "@romejs/js-compiler";
import {JSXElement} from "@romejs/js-ast";
import {descriptions} from "@romejs/diagnostics";
-import {
- hasJSXAttribute,
- isJSXElement
-} from "@romejs/js-ast-utils";
+import {hasJSXAttribute, isJSXElement} from "@romejs/js-ast-utils";
function hasAnchorContent(node: JSXElement): boolean {
- const dangerouslySetInnerHTML = hasJSXAttribute(node, "dangerouslySetInnerHTML")
+ const dangerouslySetInnerHTML = hasJSXAttribute(
+ node,
+ "dangerouslySetInnerHTML",
+ );
return (
- (
- node.children.length > 0 &&
- !node.children.some(child => child.type === "JSXElement" && hasJSXAttribute(child, "aria-hidden"))
- )||
+ (node.children.length > 0 &&
+ !node.children.some((child) =>
+ child.type === "JSXElement" && hasJSXAttribute(child, "aria-hidden")
+ )) ||
dangerouslySetInnerHTML
);
}

apply lint save to jsxA11yAnchorHasContent