eslint-plugin-unicorn
eslint-plugin-unicorn copied to clipboard
`prefer-regexp-test` catch more cases
the below cases currently not reported
if (
uri.match(/unicorn/).length ||
uri.match(/unicorn/).length > 0 ||
uri.match(/unicorn/)?.length ||
uri.match(/unicorn/)?.length > 0
) {
}
FWIW there is also regexp/prefer-regexp-test but it doesn't detect those either.