“Modern Family,” getting all together ooky. (ABC)

But let’s not forget the best way to make this a happy Halloween: by sitting down with a heaping bowl of miniature candy bars and watching a lot of television.

Halloween has long provided fodder for fine episodes of TV. The “Freaks and Geeks” Halloween episode, for example, taught us important lessons like, don’t accidentally throw eggs at your little brother. The Halloween installment of “My So-Called Life” demonstrated that sometimes the smartest move a little sister like Danielle Chase can make is to dress up as her sister, Angela.

But half-hour sitcoms, perhaps, have given us the most consistently satisfying annual scare fare. With that in mind, here’s a list of the six best Halloween sitcom episodes in semi-recent memory. (Note: “The Simpsons” “Treehouse of Horror” episodes are exempt from this list because, as previously established in this blog, they fall into a category all their own.)

6. “Parks and Recreation”: “Greg Pikitis”

This second season episode featured a showdown between Leslie Knope (Amy Poehler) and a Halloween prankster with the perfect Halloween prankster name: Greg Pikitis, otherwise known as the invisible, adolescent, James Bond supervillain, criminal mastermind.

5. “Cheers”: “Fairy Tales Can Come True”

The season two episode — the one where Diane nearly gets strangled by the madly jealous Andy while performing live theater at Cheers — is a great one. But I’ve opted to highlight this season three gem, the one where Cliff (dressed as Ponce de Leon) meets the woman of his dreams at a Halloween party but is afraid to try to rekindle their relationship once they’re out of costume. (I also love that the episode opens with Kelsey Grammer — a.k.a. Sideshow Bob — reciting “The Raven.”)

4. “The Office”: “Halloween”

Michael Scott dresses up as a two-headed monster and tries to fire someone on Halloween. I am sure we all remember this episode as the very sad farewell to the beloved Devon. Man, “The Office” was never the same without Devon.

3. “Modern Family”: “Halloween”

This season two episode, which re-aired last week, celebrates two great American Halloween traditions: people who wear costumes to work when no one else does (see Mitchell’s squeaky Spider-Man outfit) and people who go way overboard to make their house the best trick-or-treating spot on the block (see the Dunphys). Watch the full episode below.

2. “Roseanne”: “Boo!”

“Roseanne” always made a big to-do about Halloween. This 1989 episode was the first, and the one that established that the Connor family was not afraid to get a little gross on Oct. 31.

1. “The Cosby Show”: “Halloween”

Vanessa throws a Halloween party and invites the dreamy Robert. And thus, one of the great “Cosby Show” romances is born. Upon rewatching this episode, I realized why Robert was so crushable: When he asks Vanessa to go steady he sounds exactly like Michael Jackson in the “Thriller” video. Except, you know, minus the turning-into-a-werewolf part.

What’s your favorite Halloween sitcom episode? Weigh in with a comment.