Please read the passage before reading the commentary.
God is righteous and wants all of us to act in righteousness. I am not sure I like this idea, according to how I hear righteousness being interpreted. If righteousness means self-righteousness, then I am not in favor of it.
Righteousness is properly considered as right relationships. God is righteous because God is concerned with having right relationships with us and us with God. Righteousness is the reason why God sent us Jesus. It is through Jesus that God has definitively reestablished our righteousness, our right relationship, with God.
We cannot have this right relationship with God on our own. We lack the power in ourselves to do this. If we are in right relationships with God and others, it is all God’s doing, and we deserve no credit for it. We come to salvation only through God’s mercy, and it is God’s mercy that puts us in right relationships with God, with ourselves, and with others.
If we have right relationships with God, then we recognize that we are children of God, members of God’s family. The children of a family have had no say in becoming members of the family; the parents did the groundwork for the children to be born into the family. Even adopted children depend on parents to welcome them into family. We are God’s children by God’s choice and mercy, and we depend on God for our existence and our right relationships.
John writes that we are God’s children right now and that more awaits us in the future when we see God face to face. God has put us in good relationship now and will continue to keep us in the righteous relationship even until its fulness is revealed to us.
Because God is righteous, God has made us God’s children in God’s righteousness. Because all children resemble their parents, we, as God’s children, must resemble and be like God in righteousness. We are called into being in order to be, not self-righteous, but to be God’s righteous.