In a bowl, combine flour, baking powder, baking soda, and salt. Set it aside.
Using the paddle attachment, cream butter and granulated sugar together.
Add eggs, one at a time. Beating in between.
Add brown sugar, vanilla extract, and sourdough discard. Mix them all together.
Add the dry ingredients and mix them well.
Gradually pour in the chocolate chips while mixing.
Scrape the sides of the bowl. Put a plastic cover on top(or a plate) of the mixing bowl then chill in the fridge for at least 2 hours(overnight is OK, just take it out 30minutes before baking the next day so the dough is not too hard when you scoop your ball of cookies.).
Preheat the oven to 350°. Scoop balls of the dough, place in a sheet pan with parchment paper. Bake in the oven for 12 minutes. Do this in batches.
Cool the cookies in a rack.
Store in a cookie jar once cooled completely.
Or a tray/platter with cover.