Jesus says in Matthew 5:
For I tell you, unless your righteousness exceeds that of the scribes and Pharisees, you will never enter the kingdom of heaven.
You have heard that it was said to those of ancient times, ‘You shall not murder’; and ‘whoever murders shall be liable to judgment.’ But I say to you that if you are angry with a brother or sister, you will be liable to judgment; and if you insult a brother or sister, you will be liable to the council; and if you say, ‘You fool,’ you will be liable to the hell of fire. So when you are offering your gift at the altar, if you remember that your brother or sister has something against you, leave your gift there before the altar and go; first be reconciled to your brother or sister, and then come and offer your gift. Come to terms quickly with your accuser while you are on the way to court with him, or your accuser may hand you over to the judge, and the judge to the guard, and you will be thrown into prison. Truly I tell you, you will never get out until you have paid the last penny.
You have heard that it was said, ‘You shall not commit adultery.’ But I say to you that everyone who looks at a woman with lust has already committed adultery with her in his heart. If your right eye causes you to sin, tear it out and throw it away; it is better for you to lose one of your members than for your whole body to be thrown into hell. And if your right hand causes you to sin, cut it off and throw it away; it is better for you to lose one of your members than for your whole body to go into hell.
It was also said, ‘Whoever divorces his wife, let him give her a certificate of divorce.’ But I say to you that anyone who divorces his wife, except on the ground of unchastity, causes her to commit adultery; and whoever marries a divorced woman commits adultery.
Again, you have heard that it was said to those of ancient times, ‘You shall not swear falsely, but carry out the vows you have made to the Lord.’ But I say to you, Do not swear at all, either by heaven, for it is the throne of God, or by the earth, for it is his footstool, or by Jerusalem, for it is the city of the great King. And do not swear by your head, for you cannot make one hair white or black. Let your word be ‘Yes, Yes’ or ‘No, No’; anything more than this comes from the evil one.
You have heard that it was said, ‘An eye for an eye and a tooth for a tooth.’ 39 But I say to you, Do not resist an evildoer. But if anyone strikes you on the right cheek, turn the other also; and if anyone wants to sue you and take your coat, give your cloak as well; and if anyone forces you to go one mile, go also the second mile. Give to everyone who begs from you, and do not refuse anyone who wants to borrow from you.
You have heard that it was said, ‘You shall love your neighbor and hate your enemy.’ But I say to you, Love your enemies and pray for those who persecute you, so that you may be children of your Father in heaven; for he makes his sun rise on the evil and on the good, and sends rain on the righteous and on the unrighteous. For if you love those who love you, what reward do you have? Do not even the tax collectors do the same? And if you greet only your brothers and sisters, what more are you doing than others? Do not even the Gentiles do the same? Be perfect, therefore, as your heavenly Father is perfect.
“Unless your righteousness exceeds that of the scribes and Pharisees,” is an explanation of the following exhortations. The scribes and the Pharisees lay down one rule, and in each case Jesus lays down another, stricter rule.
The scribes and the Pharisees forbid murder; Jesus forbids anger. They forbid adultery, but Jesus forbids even lust. They command that the legal process be followed if one wishes for a divorce; Jesus forbids divorce itself. They order the keeping of oaths; Jesus forbids the oaths in the first place.
The scribes and the Pharisees command that justice be observed in relation to others, so that one would do good toward the good, and evil toward the evil. Jesus commands instead that one do good to all, whether they are good or evil.
Jesus makes an argument for his position: “Love your enemies and pray for those who persecute you, so that you may be children of your Father in heaven; for he makes his sun rise on the evil and on the good, and sends rain on the righteous and on the unrighteous.” In other words, God does not distinguish between people, doing good things to the good and bad things to the evil, but instead he gives all things to everyone. While Job considered this an objection against God, Jesus puts it forward as something to be imitated. It may be that some people are harmed on occasion by sun and by rain, but these are fundamentally good things that benefit humanity: and so we see that God does good things towards all. We imitate this by ourselves doing good towards all.