If in federal court based on federal question jurisdiction federal law applies.
In cases in federal court based on diversity jurisdiction the court will have to choose what law to apply. Under the Erie doctrine:
If there is no conflict between federal and state law, federal law will be used procedurally and state law will be used substantively.
If there is a conflict, then if there is an arguably procedural federal directive on point, federal law will apply.
If not, court will examine whether the choice of law is outcome determinative or whether the plaintiff was forum shopping, in which case law will be applied.