Ah, the quest for perfect edges! Keeping an even tension and consistently knitting the first and last stitches of each row can help.  A pro tip: Try slipping the first stitch of every row knitwise (like knitting it without actually knitting it) – it creates a smooth, tidy edge. Voilà!