Kind of, maybe, but it’s a little complicated.
Short answer: probably not.
Long answer: Creditors can object to your bankruptcy filing and argue that it was made in bad faith. This is very rare. If this happens, your entire bankruptcy case is thrown out.
Creditors can also file a bankruptcy court lawsuit against you called an “adversary proceeding.” This is much more common. If you make credit purchases within 90 days of filing bankruptcy, there is a presumption that you did those in contemplation of bankruptcy. (You charged up a card knowing that you would bk it). In this situation, a creditor can file the adversary proceeding and get a bankruptcy judgment against you that says that those charges are not discharged by the bankruptcy. In other words, you still have to pay those charges back.
There is a stronger likelihood of this happening if you are purchasing luxury items, such as a big screen tv or a trip to Hawaii. Incidental charges for a gas fill up or a small grocery run probably won’t sink your case. However, morally, it’s wrong to charge up your card knowing that your going to bankrupt it. Even if it’s right before Christmas. Going bankrupt after a job loss or a huge medical bill is one thing, but charging up your cards knowing that you will never pay those debts back is wrong.