Preheat oven to 350°F (175°C).
Line a cake pan with parchment paper.
Mix flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
Cream sugar and oil until fluffy.
Add eggs one by one, mixing well.
Stir in vanilla extract.
Gradually add flour mixture to wet ingredients.
Fold in carrots, pineapple, and walnuts.
Pour batter into the prepared pan.
Bake for 30-35 minutes until a toothpick comes out clean.
Cool on a rack before serving.