A link opens a new tab without rel="noopener"
What it finds
A link with target="_blank" opens a page that, in older browsers and some embedded views, gets a reference to the opening page through window.opener and can navigate it to a look-alike, which is called tabnabbing. rel="noopener" or rel="noreferrer" cuts that reference.
Reported are JSX <a> and <area> elements with target="_blank" and an href that is an expression or an absolute URL, and with no rel that contains noopener or noreferrer. Elements with spread attributes may set rel elsewhere and are left alone. Current browsers imply noopener for such links, which is why this is a strict rule.
From the rule's source, link_target_blank.rs.
Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/ts:link-target-blank" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/ts:link-target-blank] reason="..."tx0 explain tx0/ts:link-target-blank shows the same in the terminal. Found a false positive? Report it.