UseDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sindresorhus/eslint-plugin-unicorn/llms.txt
Use this file to discover all available pages before exploring further.
.includes() instead of comparing the result of .indexOf() or .lastIndexOf() against -1 or 0. Also prefer .includes() over a simple Array#some() callback that only checks for strict equality. All built-in strings and arrays support .includes(), which reads as plain English and expresses intent directly.
| Recommended | ✅ recommended · ☑️ unopinionated |
| Fixable | 🔧 Auto-fixable |
| Suggestions | 💡 Has suggestions |
This rule is fixable unless the search expression in
Array#some() has side effects. Calls to _.indexOf(), lodash.indexOf(), and underscore.indexOf() are intentionally ignored.