Skip to content

Instantly share code, notes, and snippets.

@mike-solomon
Created September 2, 2022 19:21
Show Gist options
  • Save mike-solomon/29593c0a15fa0720eb014b037cf51e39 to your computer and use it in GitHub Desktop.
Save mike-solomon/29593c0a15fa0720eb014b037cf51e39 to your computer and use it in GitHub Desktop.
Example of a ESLint rule markdown file
title layout rule_type
no-bacon
doc
suggestion

Developers should not include bacon in their identifiers -- especially when the code does not relate to bacon.

Rule Details

This rule disallows bacon in identifiers.

Examples of incorrect code for this rule:

const bacon = 'hello';
function baConstructor() {};
class someBaconClass {};

Examples of correct code for this rule:

const bac = 'hello';
function ba_con() {};
class b4c0n {};

When Not To Use It

If your code relates to bacon, you shouldn't enable this rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment