Preheat your oven to 350°F (175°C).
In a bowl, whisk together flour, baking soda, baking powder, cinnamon, nutmeg, and salt.
In a separate bowl, cream the softened butter with brown sugar and granulated sugar until light and fluffy.
Add the egg and vanilla extract to the butter mixture and mix well.
Gradually incorporate the dry ingredients into the wet ingredients.
Fold in the grated carrots, nuts, and raisins if using.
Drop spoonfuls of dough onto a lined baking sheet, spacing them apart.
Bake for 12-15 minutes or until the edges are golden.
Remove from the oven and allow to cool on a wire rack.
Optional: Frost with cream cheese frosting once cooled.