# 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


# 🚀 Version

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

# 🔍 Implementation

Last Updated: 6/25/2022, 12:32:38 PM