Latin Abbreviation Substitution Rule

This rule enforces the replacement of common Latin abbreviations ("e.g." and "i.e.") with their plain English equivalents. The rule aims to improve readability and accessibility by using clear, straightforward language instead of potentially confusing Latin phrases.

Many style guides, including Google's Developer Documentation Style Guide, recommend avoiding Latin abbreviations because they can be unfamiliar to non-native English speakers and can create confusion about their precise meaning. Using plain English alternatives makes content more accessible and easier to understand.

Examples:

✗ Incorrect:

  • "Web browsers (e.g., Chrome, Firefox)"
  • "The cache is full, i.e., you need to clear it"
  • "Common devices eg smartphones"
  • "Backend services ie servers and databases"

✓ Correct:

  • "Web browsers (for example, Chrome, Firefox)"
  • "The cache is full, that is, you need to clear it"
  • "Common devices, for example, smartphones"
  • "Backend services, that is, servers and databases"

The rule will flag any usage of "e.g.", "eg", "i.e.", or "ie" (with or without periods) and suggest replacing them with "for example" or "that is" respectively.

Rule Source

This rule comes from: https://github.com/mui/material-ui

Rule Definition

extends: substitution
message: Use '%s' instead of '%s'
link: https://developers.google.com/style/abbreviations
ignorecase: false
level: error
nonword: true
action:
  name: replace
swap:
  '\b(?:eg|e\.g\.)(?=[\s,;])': for example
  '\b(?:ie|i\.e\.)(?=[\s,;])': that is