Yes, J2.
This code is mostly what you need, but remove the lines disabling the BATFET because if you disable that, you can't power by the JST battery connector.
If you are in a situation where you have a power supply on VIN that can support 1800 mA and do so very quickly, it is possible to use the Electron without the LiPo battery. One use case for this high or low temperature environments, outside of the range of the LiPo.
I think I discovered the settings you must make to disable the battery and charging completely. I had missed the watchdog before, and that would cause the charging light to start blinking at odd times, including when sleeping. Then …