In a large mixing bowl, cream together the butter, granulated sugar, and brown sugar using an electric mixer until light and fluffy (about 2 minutes).
Add in the eggs and vanilla extract, mixing until smooth.
In a separate bowl, whisk together the flour, baking powder, cinnamon, nutmeg, ginger, and salt.
Gradually fold the dry ingredients into the wet ingredients until just combined.
Gently fold in the grated carrots and chopped pecans (if using).