The short answer is that if you tried doing this, you would be getting into lots of (mathematical) trouble.  There were a number of papers and preprints by Alexander Rosenberg devoted to this problem, with the titles like "Noncommutative affine schemes", "Noncommutative local algebra", "Noncommutative globalization", "Noncommutative schemes", etc., some of them apparently still unpublished (for reasons not known to me).  This culminated in the paper "Noncommutative smooth spaces", by Kontsevich and Rosenberg, which available from the <a href="https://arxiv.org/abs/math/9812158">arXiv</a>.  Hardly any traces of Hartshorne's Chapter II exposition remained in this final approach.