Superconductivity protected by spin–valley locking in ion-gated MoS2