Obedience to any list of rules in an attempt to earn eternal salvation or forgiveness of sins is legalism.

Obedience to God is not legalism.