01 - Preheat the oven to 350°F. Line two baking sheets with parchment paper.
02 - Whisk together flour, baking soda, salt, cinnamon, ginger, nutmeg, and cloves in a medium bowl.
03 - Beat butter, brown sugar, and granulated sugar in a large bowl until light and creamy, about 2 minutes.
04 - Add maple syrup, egg, and vanilla to the butter mixture and beat until combined.
05 - Gradually add dry ingredients to the wet mixture, stirring until just incorporated.
06 - Fold in chocolate chips and walnuts if using.
07 - Drop tablespoon-sized portions of dough onto prepared baking sheets, spacing about 2 inches apart.
08 - Bake for 11 to 13 minutes until edges are golden but centers remain soft.
09 - Let cookies cool on baking sheets for 5 minutes, then transfer to a wire rack to cool completely.