# regexp/sort-alternatives

sort alternatives if order doesn't matter

# 📖 Rule Details

This rule will sort alternatives to improve readability and maintainability.

The primary target of this rule are lists of words and/or numbers. These lists are somewhat common and sorting them makes it easy for readers to check whether a particular word or number is included.

This rule will only sort alternatives if reordering the alternatives doesn't affect the pattern.

Now loading...

# 🔧 Options

Nothing.

# 🚀 Version

This rule was introduced in eslint-plugin-regexp v0.12.0

# 🔍 Implementation