Trace connection to Through hole via
Variant "b" is correct. But "a" will also be correct, after moving wire to corner of square pad on 45 degree or align it to center of the pad's edge.

Also, design rules for PCB described in standards IEC 61188-x-x.