Preheat your oven to 375°F (190°C) and line a muffin tin with paper liners.
In a large bowl, whisk together the flour, sugar, baking powder, baking soda, and salt.
In a separate bowl, beat the eggs and then mix in the vegetable oil until well combined.
Add the wet ingredients to the dry ingredients and stir until just combined.
Gently fold in the crushed pineapple, shredded carrots, and chopped walnuts, if using.
Divide the batter evenly among the muffin cups, filling each about 2/3 full.
Bake for 18-20 minutes, or until a toothpick inserted into the center of a muffin comes out clean.
Allow the muffins to cool in the tin for a few minutes before transferring them to a wire rack to cool completely.