28 U.S. Code § 455 requires that “any justice, judge, or magistrate judge of the United States shall disqualify himself in any proceeding in which his impartiality might reasonably be questioned.”
If Thomas fails to recuse himself from Moore v Harper, he'll be breaking that law.