semicolon-troll

Write syntax errors into staged JavaScript files before committing them.

Usage no npm install needed!

<script type="module">
  import semicolonTroll from 'https://cdn.skypack.dev/semicolon-troll';
</script>

README

semicolon-troll

Inspired by this tweet:

Tweet by Ben Johnson @benbjohnson: "Replace a semicolon (;) with a greek question mark (Íž) in your friend's JavaScript and watch them pull their hair out over the syntax error."

The install/uninstall scripts were copied wholesale from observing/pre-commit@1.1.2

Usage

  • npm install semicolon-troll
  • That's it!

When enough is enough

  • npm uninstall semicolon-troll will remove the pre-commit hook.

What does it do

  • Installs a Git pre-commit hook that will replace all semicolons in staged JavaScript files with greek question marks.
  • Stages those changes for committing.