Grieving the Spirit isn’t just about not doing sinful actions; it’s also caused by not doing God’s promptings. That's one of the main points of Paul's writings on the new self and old self. There is no legalistic checklist that we can complete to be right with God; He desires total surrender and wants us to do His will rather than just abstain from actions outside of His will.
Do not grieve the Holy Spirit by whom you were sealed for the day of redemption (Ephesians 4:30).
First, we must realize that the Holy Spirit is not some invisible force. When writing this, I wanted to keep calling the Holy Spirit an “it.” “It” often refers to a dead, inanimate thing, but a “he” is living. Inside me, there is a part that thinks of the Holy Spirit as the lesser part of the Trinity, but Jesus taught that it would be better for us to have the Holy Spirit than to have Jesus physically with us (John 16:7). The Holy Spirit is not a lesser “it’ but a powerful “He.”
When we talk about grieving the Holy Spirit, we are talking about grieving the person who resides in each one of us. The word grieve is a term of disappointment by someone who loves the individual but is hurt by the person behaving in a destructive way. When the Spirit is grieved, it is because we have behaved in a way that is not what is best for us. This then causes us to miss out on some of the blessings the Spirit wants to develop in our life.
The Holy Spirit is the seal of our salvation. The Scriptures are clear in that if we have the Holy Spirit, we have salvation. If we do not have the Holy Spirit, we do not have salvation.
S. Lewis Johnson explained the historical background behind sealing that the readers in Ephesus would have known when Paul used that analogy:
Our culture is more familiar with the tradition of cow branding. Farmers who share grazing grounds brand their cows to mark ownership. It is the same way with the Holy Spirit as the seal of salvation. We’ve been sealed by God to show that we are His, but that does not mean we just float in the port waiting for Jesus to come back. He has come and lives in each one us as the Holy Spirit. Like a log that has been sealed to be taken and used by its owner, we have been sealed and are now being shaped into a beautiful house by our owner. We are not a log that has been sealed to just float; we are logs that have been sealed with a purpose and are being shaped by the Holy Spirit into what the Father saw in us when Jesus bought us. We are being shaped together into something greater than we can be on our own. Logs built together by a master carpenter can be built into magnificent structures."This was particularly significant for the Ephesians, because in Ephesus, there was a great deal of trading going on in timber. And it was a kind of center for that. And individuals in the harbor of Ephesus in those days, which was different from the Ephesus of the present time, the harbor would be filled with logs which had been brought down from that inner part of Asia Minor. And when individuals came from the other cities, round about, or the villages, round about, to buy lumber, because there was a good bit of industry in that area, they would buy some of the logs that were floating in the harbor, and they would take a seal. And they would make their particular mark on each of the logs that belonged to them which they bought. And later on, when the time came for them to take possession of these things, someone would come back with the seal, and then the particular logs that belonged to him would be identified, and then taken to the particular place where they were to be used."