لَا يُؤَاخِذُكُمُ اللَّهُ بِاللَّغْوِ فِي أَيْمَانِكُمْ وَلَكِن يُؤَاخِذُكُم بِمَا عَقَّدتُّمُ الْأَيْمَانَ فَكَفَّارَتُهُ إِطْعَامُ عَشَرَةِ مَسَاكِينَ مِنْ أَوْسَطِ مَا تُطْعِمُونَ أَهْلِيكُمْ أَوْ كِسْوَتُهُمْ أَوْ تَحْرِيرُ رَقَبَةٍ فَمَن لَّمْ يَجِدْ فَصِيَامُ ثَلَاثَةِ أَيَّامٍ ذَلِكَ كَفَّارَةُ أَيْمَانِكُمْ إِذَا حَلَفْتُمْ وَاحْفَظُوا أَيْمَانَكُمْ كَذَلِكَ يُبَيِّنُ اللَّهُ لَكُمْ آيَاتِهِ لَعَلَّكُمْ تَشْكُرُونَ
Allah shall not take you to task for what is frivolous in your oaths; but He shall take you to task for what you pledge in earnest. The atonement for it is to feed ten needy persons with the average food you give to your families, or their clothing, or the freeing of a slave. He who cannot afford [any of these] shall fast for three days. That is the atonement for your oaths when you vow. But keep your oaths. Thus does Allah clarify His signs for you so that you may give thanks.
Agha Ali Puya Commentary
Commentary on Quran 5:89
[Pooya/Ali Commentary 5:89] Aqa Mahdi Puya says: To swear to do what is forbidden or not to do what is obligatory is condemnable. To swear to do or not to do that which is optional in shari-ah is a binding oath. Also to swear to do that which is commendable or not to do that which is not honourable is a binding oath. For rules of expiation in addition to this verse, please also refer to books of fiqh.