Profanity linter

Node-based CLI tool which finds variations of profane words within a set of given files and throws errors accordingly. Useful for preventing debug statements and unprofessional comments from being committed to git!


  • Reports the line number and number of occurrences of detected profanity.
  • Helps prevent committing those classic console.log('wtffff'); debugging comments!
  • Can detect number/letter substitution (e.g. H3110 is parsed as hello)
  • Several command line options are available:

Technical Details

  • Uses an array of ‘bad words’, unless provided with another set.
    • This array is base64-encoded, to prevent profane language from appearing in other repos that have profamity as a dependency.
  • Builds a set of regular expressions based on the given ‘bad words’.
    • A set of letter/number substitutions are used to prevent leetspeak.
    • This also lets us detect repeated letters (like thissssss)
  • For each file, loops over each line and checks if any of the regex’s match.

Pretty simple!

Name Origin