Skip to content

"Originality is the best form of rebellion." – Mike Sasso

Disallow xkcd references (no-xkcd) ​

πŸ’Ό This rule is enabled in the following configs: 🌐 all, βœ… recommended.

πŸ”§ This rule is automatically fixable by the --fix CLI option.

πŸ“– Rule details ​

xkcd is great and all, but references to it are overused! Also, you're not edgy or teaching anyone anything. Everybody and their grandma is reading it, and we've all seen that comic a billion times, especially #927 (you already know which one I'm talking about).

On exception for https://xkcd.com/2832 which is allowed because fuck cars.

πŸ’‘ Examples ​

js
// ❌ Incorrect
// lol xkcd/3241
const woof = 'woof'

// βœ… Correct
// lol it's nonsense
const woof = 'woof'

πŸ”§ Config ​

js
{ rules: { 'ninja/no-xkcd': 2 } }

πŸ§‘β€πŸ’» Demo ​

Released under the MIT License