'Righteousness' in the Bible
It will be [considered] righteousness for us [that is, right standing with God] if we are careful to observe all this commandment before the Lord our God—just as He has commanded us.
“Do not say in your heart when the Lord your God has driven them out before you, ‘Because of my righteousness the Lord has brought me in to possess this land,’ but because of the wickedness of these nations the Lord is dispossessing them before you.
It is not for your righteousness or for the uprightness of your heart that you are going to possess their land, but because of the wickedness of these nations the Lord your God is driving them out before you, and to confirm the oath which the Lord swore to your fathers, to Abraham, Isaac, and Jacob.
“Know [without any doubt], that the Lord your God is not giving you this good land to possess because of your righteousness, for you are a stiff-necked (stubborn, obstinate) people.
You shall certainly restore the pledge (security deposit) to him at sunset, so that he may sleep in his garment and bless you; and it will be credited to you as righteousness (right standing) before the Lord your God.
“They will call the peoples to the mountain (Mount Carmel);There they will offer sacrifices of righteousness;For they will draw out the abundance of the seas,And the hidden treasures of the sand.”