My electrical wire to my dishwasher comes up through a hole in the subfloor wired right to the dishwasher. I wanted to replace it (too much to go into here, just know the subfloor got wet, and I really don't like the wire there sitting in water when something goes wrong.). Can I rerun 14/2 NM Romex from the panel to the sink cabinet next to the dishwasher and then run wire from that new junction box to the dishwasher? I don't think it should simply come through the floor like that. Maybe it could 40+ years ago (maybe today too), but I want it moved.
I hate pulling the dishwasher out super far to check things. I thought the electrical would be easier to troubleshoot in the future, if I took this opportunity to rewire it. I would still have to pull the dishwasher out a little bit to look at the small junction box built into the dishwasher where you hardwire it. I'm only talking about the main line from the main panel box.
There is no garbage disposal if it matters. It is 15A, but of course I will double-check.