Jesus teaches a high standard of righteousness, requiring sincerity in the heart. In startling words, he warns us against anger, adultery, oaths and vengeance. He says that we must love even our enemies (Matthew 5).
The Pharisees were known for strict standards, but our righteousness should be better than theirs (which could be rather dismaying, if we forget about the mercy promised earlier in the Sermon). True righteousness is internal. In chapter six, Jesus illustrates this point by denouncing religion done for show.