The way pin assignments work on the F103 in the Espruino is a bit crazy: peripheral pins are specified per-peripheral rather than per-pin, but you can choose between input/output (or a peripheral) on a per-pin basis.
However, as D2 isn't being used for anything special for the SD card (it's just a basic GPIO pin) you're absolutely fine.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As @DrAzzy says, you should be fine.
The way pin assignments work on the F103 in the Espruino is a bit crazy: peripheral pins are specified per-peripheral rather than per-pin, but you can choose between input/output (or a peripheral) on a per-pin basis.
However, as D2 isn't being used for anything special for the SD card (it's just a basic GPIO pin) you're absolutely fine.